Question: Define a Haskell function named addUs that adds 2 input numbers. Using this function as a building block, define a Haskell function multiplyUs that multiplies

Define a Haskell function named addUs that adds 2 input numbers. Using this function as a building block, define a Haskell function multiplyUs that multiplies two input numbers. The multiplyUs function should cater to the following:
Inputs may be signed numbers, e.g., multiplyUs (-2)(3) should result in -6, and multiplyUs (-2)(-6) should result in 12.
It should use guard expressions and recursion.
There is no need to write the main function to perform user interaction. Writing the definition for addUs and multiplyUs is sufficient.
Explain the type signature for your code.

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!