28 Dec
2007
28 Dec
'07
1:45 p.m.
ChrisK <haskell@list.mightyreason.com> wrote:
zeroNothing Nothing = Nothing zeroNothing (Just n) = if n == 0 then Nothing else (Just n)
versus
zeroNothing Nothing = Nothing zeroNothing x@(Just n) = if n == 0 then Nothing else x
versus zeroNothing Nothing = Nothing zeroNothing x = let (Just n) = x in if n == 0 then Nothing else x so, @ is kind of like a let, just with its arguments flipped.