Question: This task asks you to write small programs in Haskell. Remember do not use Haskells primitive functions or libraries, just recursion, function definitions, and arithmetic.

This task asks you to write small programs in Haskell. Remember do not use Haskells primitive functions or libraries, just recursion, function definitions, and arithmetic.

a. Rewrite the following function in a super-idiomatic Haskelly Haskell Haskell style:

myFun : : (Num n, Show n, Ord n) => n -> String myFun = -> if 5 > n then show(n) elseif (>5) n

then "TooBig" else (if (/=) n 5 then "Error" else "You Win")

b. fullList : : [t] -> Bool Return true if the list is full. Ex. [] return false [5] return true.

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 Databases Questions!