I\'m trying to utilize the Maybe type in Haskell. I have a lookup for key, value tuples that returns a Maybe. How do I access the data that was wrapped by Maybe? For exam
Just as a side note: Since Maybe is a Monad, you can build computations using do-notation ...
sumOfThree :: Maybe Int
sumOfThree = do
a <- someMaybeNumber
b <- someMaybeNumber
c <- someMaybeNumber
let k = 42 -- Just for fun
return (a + b + c + k)