
31 May
2007
31 May
'07
9:55 p.m.
On 31/05/07, Isaac Dupree
foo undefined = undefined
That's not true. When you evaluate foo undefined, it matches the first (irrefutable) pattern immediately, without any deconstruction of the undefined argument (which is the entire point of it being a lazy pattern). So it becomes the right hand side, C <thunk>. Only when you force that <thunk> would you have to force the undefined argument, so foo undefined = C undefined: *Main> foo undefined C *** Exception: Prelude.undefined -- -David House, dmhouse@gmail.com