|
|
|
|
|
by GregBuchholz
3438 days ago
|
|
>in Haskell, by default you can't compare an Optional with the value it wraps: `5 == Just 5` fails. -- Probably nothing like in Swift
instance (Num a , Integral a) => Num (Maybe a) where
fromInteger x = Just (fromIntegral x)
main = print $ 5 == (Just 5)
|
|