16 Apr
2007
16 Apr
'07
2:46 p.m.
Jeremy Shaw wrote:
I noticed that the results can be a bit suprising sometimes. See if you can predict the answers to these (in ghci):
Interesting examples. Here's another one that I would find problematic: *SameType> same Nothing (Just "xyzzy") False *SameType> same (Nothing :: Maybe String) (Just "xyzzy") True And of course, the case with the integers lifts right up: *SameType> same (Just 1) (Just 1) False