On Wed, 19 Sep 2007, Peter Verswyvelen wrote:
I got stuck with an endless loop when trying to split a stream into a pair of
two streams (a kind of reactive if/then/else). Luckily I first read the
Haskell School of Expression so I remembered that pattern matching is not
lazy and this could be the cause, which it was (I had to replace (x:xs) by
~(x:xs))
...
Now why isn't pattern matching lazy by default? This seems odd for a newbie
since everything else is lazy by default.
It's even more confusing that pattern matching in 'let' _is_ lazy.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe