Course Solutions Uncategorized (Solved) : 3 Lazy Evaluation 25 Marks Question Consider Following Collection Haskell Function Definit Q31016006 . . . .

(Solved) : 3 Lazy Evaluation 25 Marks Question Consider Following Collection Haskell Function Definit Q31016006 . . . .

 

3: “Lazy Evaluation” (2.5 marks)
For this question, you will consider the following collection ofHaskell function definitions
and then evaluate whichever of the expressions (of the followingpage) corresponds to the
2nd LAST DIGIT of your student number.

puzzle :: Int -> Int -> Int
puzzle a b = a * b
enigma :: Int -> Int -> Int
enigma a b = a – b
secret :: Int -> Int -> Int
secret a b = b – a

If the 2nd LAST DIGIT of your student number is 1, 2, or 3, thentrace the evaluation of:
enigma (secret (puzzle 1 3) 5) 7
If the 2nd LAST DIGIT of your student

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post