How to get the value of a Maybe in Haskell
From the standard Prelude, maybe :: b -> (a -> b) -> Maybe a -> b maybe n _ Nothing = n maybe _ f (Just x) = f x Given a default value, and a function, apply the function to the value in the Maybe or return the default value. Your eliminate could be … Read more