
10 Mar
2006
10 Mar
'06
6:01 a.m.
"Simon Marlow"
Here's another couple that just occurred to me:
f x | let y = x = y f x = case x of _ | let y = x -> y
granted these are unlikely to occur in practice.
Are these Haskell'98? I'm afraid I don't understand how a let binding (without "in") can occur in a guard for a function decl or case branch. In Ben's examples, the vertical bar was not a guard, but the separator in a comprehension (although he omitted to show the surrounding brackets...) [ ... | let x, y :: T x = 3 y = 4, ... ] [ ... | let x = 3, ... ] Regards, Malcolm