
19 Sep
2007
19 Sep
'07
3:54 p.m.
On Wednesday 19 September 2007, C.M.Brown wrote:
g is strict in its first argument. Declared in a let it would look like:
f x = let g x = case x of (Just y) -> y Nothing -> error "Nothing" in g x
Again, g must be strict in its first argument.
Actually, f x = let g (Just x) = x g Nothing = error "Nothing" in g x is a valid definition. A let expression can have multiple definitions just like a where clause. -- Dan