Haskell "Source reduction"

Posted by Martin on Stack Overflow See other posts from Stack Overflow or by Martin
Published on 2010-05-22T11:26:24Z Indexed on 2010/05/22 11:30 UTC
Read the original article Hit count: 136

Filed under:
|
|

I'm revising for an upcoming Haskell exam and I don't understand one of the questions on a past paper. Google turns up nothing useful

fst(x, y) = x
square i = i * i

i) Source reduce, using Haskells lazy evaluation, the expression:

fst(square(3+4), square 8)

ii) Source reduce, using strict evaluation, the same expression

iii) State one advantage of lazy evaluation and one advantage of strict evaluation

© Stack Overflow or respective owner

Related posts about beginner

Related posts about homework