Haskell puzzles!

Zdenek Dvorak rakdver@hotmail.com
Thu, 21 Mar 2002 07:44:51 +0000


Hello.

>- All the answers are at the end of this mail.
>
>-----------------------------------------------------
>1) Are e1 and e2 equal?
>
> > f (x:xs) y  = x
> > g (x:xs)    = \y -> x
> >
> > e1 = seq (f []) 1
> > e2 = seq (g []) 1

Should not these be

f (x:xs) y  = y
g (x:xs)    = \y -> y
?
Otherwise, both e1 and e2 are obviously undefined.

Zdenek Dvorak


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com