@@ -12,8 +12,6 @@ module Maybe (Maybe(..), maybe, isJust, isNothing, map) where
15−import Basics (not, (.))
17{-| The Maybe datatype. Useful when a computation may or may not
15{-| The Maybe datatype. Useful when a computation may or may not
18result in a value (e.g. logarithm is defined only for positive
16result in a value (e.g. logarithm is defined only for positive
@@ -49,7 +47,7 @@ isJust = maybe False (\_ -> True)
49 isNothing Nothing == True
47 isNothing Nothing == True
51isNothing : Maybe a -> Bool
49isNothing : Maybe a -> Bool
52−isNothing = not . isJust
50+isNothing = maybe True (\_ -> False)
54{-| Transform the contents of a `Maybe` with a given function:
52{-| Transform the contents of a `Maybe` with a given function: