Question: USE HASKELL PROGRAMMING LANGUAGE TO ANSWER THE QUESTIONS. Write a definition of a function called add . It should take two Integers ( a and

USE HASKELL PROGRAMMING LANGUAGE TO ANSWER THE QUESTIONS.
Write a definition of a function called add . It should take two Integers ( a and b) as inputs and an
Integer as the output. The result should be the addition of two input numbers (a+b).
Write a definition of a function called double. It should take one Integer as the input (n) and an
Integer as the output. The function should double the value of the input value n, which is 2n.
Write a definition of a function called area to calculate the area of a circle. It should take one
Float as the input (r) and a Float as the output.
Write a definition of a function called cube to calculate the cube of an input n. Both input and
output types are Integer.
Write a definition of a function to double the area of a circle. The function only takes one Float
input. You should reuse the function area you defined.
Write a definition of a function called cylinder to calculate the volume of a cylinder. The
function takes two input, a Float (r) and a height (h). You should reuse the function area you
defined.
Write a function to convert Celsius to Fahrenheit. It takes a Float input (c) and produces a Float
output (f).(Formula: (c95)+32.
Give another version of the definition of exclusive or which works informally like this: exclusive or
of x and y will be True if either x is True and y is False, or x is False and y is True.
Give two different definitons of the nAnd function:
nAnd : : Bool Bool Bool
which returns the result True except when both its arguments are True.
Write a function min to find the minimum number of two given numbers. The function take two
integers as input and return an integer as output.
USE HASKELL PROGRAMMING LANGUAGE TO ANSWER THE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!