Extra Maybe functions.
Takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.
Maybe
Nothing
Just
Version of map which throw out elements.
Takes a list of Maybe and returns a list of all the Just values.
Returns True if its argument is of the form Just _
True
Just _
Returns True if its argument is Nothing
Takes a default value, a function, and a
Maybevalue. If theMaybevalue isNothing, the function returns the default value. Otherwise, it applies the function to the value inside theJustand returns the result.