Zdenek Dvorak wrote:
>>-
>>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 e
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
?
Ot
Daan Leijen writes:
> 1) Are e1 and e2 equal?
>
> > f (x:xs) y = x
> > g (x:xs)= \y -> x
> >
> > e1 = seq (f []) 1
> > e2 = seq (g []) 1
> ...
> 1)
> answer:
> "e1" equals the value 1, while "e2" is undefined.
> ...
> opinion:
> I think that the pattern matching translation rules
> a
Hi all,
I have put together some interesting Haskell puzzles!
Not many people were able to solve all three puzzles
so don't be discouraged you don't know all the answers.
Have fun,
Daan.
-
- All three puzzles are "Haske