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 as inputs and an
Integer as the output. The result should be the addition of two input numbers
Write a definition of a function called double. It should take one Integer as the input and an
Integer as the output. The function should double the value of the input value which is
Write a definition of a function called area to calculate the area of a circle. It should take one
Float as the input and a Float as the output.
Write a definition of a function called cube to calculate the cube of an input 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 fFormula:
Give another version of the definition of exclusive or which works informally like this: exclusive or
of and will be True if either is True and is False, or is False and 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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
