
19 Sep
2007
19 Sep
'07
6:49 a.m.
On 9/19/07, Peter Verswyvelen
Now why isn't pattern matching lazy by default? This seems odd for a newbie since everything else is lazy by default.
AFAIK, pattern matches are desugared to cases, so f (x:xs) = rhs f [] = rhs' is equivalent to f y = case y of (x:xs) -> rhs [] -> rhs' Case's have to be strict because that's how we look inside the values in Haskell =). Of course I may be somehow mistaken here, as I am learning Haskell, too. -- Felipe.