
21 Jan
2011
21 Jan
'11
5:15 a.m.
On Fri, 21 Jan 2011 10:30:02 +0100, Henk-Jan van Tuyl
The Haskell 2010 Language Report[0] says that case expressions work with patterns; the nullPtr is regarded as a pattern that matches anything.
It can be demonstrated by the following:
Program Case.lhs:
c = 1
f = case 0 of c -> print 0 1 -> print 1
That should have been:
0 -> print 1
to be a proper example, but the result is identical. Regards, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --