Last active
February 5, 2018 07:13
-
-
Save akoppela/ae7f12fb1a4a40ee9e1994697837300f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-| Returns just true if given maybe is just something. | |
Otherise returns just false if given maybe is nothing. | |
maybeAndToBool (Just 42) == Just True | |
maybeAndToBool Nothing == Just False | |
-} | |
maybeAndToBool : Maybe a -> Maybe Bool | |
maybeAndToBool maybe = | |
case maybe of | |
Just _ -> | |
Just True | |
Nothing -> | |
Just False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment