|
|
|
|
|
by dragonwriter
4181 days ago
|
|
> Of course, there's also the fact that because all these values are now monads, you can only interact with them through layers of flatMaps I can easily (and without using any monad specific operations, bind/"flatMap" or otherwise) write a function that interacts with values wrapped in a Maybe monad. isJust :: Maybe a -> Bool
isJust (Just _) = True
isJust (Nothing) = False
Of course, I can use monadic operations with any type that is a member of the Monad typeclass, but that doesn't preclude having other alternatives. |
|