CurryInfo: base-3.4.0 / Data.Maybe.maybe

definition: Info
 
maybe :: b -> (a -> b) -> Maybe a -> b
maybe n _ Nothing  = n
maybe _ f (Just x) = f x
demand: Info
 argument 3
deterministic: Info
 deterministic operation
documentation: Info
 
The `maybe` function takes a default value, a function, and a `Maybe` value.
If the `Maybe` value is `Nothing`, the default value is returned.
Otherwise, the function is applied to the value inside the `Just`
and the result is returned.
failfree: Info
 (_, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,{Nothing}) |-> _ || (_,_,{Just}) |-> _}
name: Info
 maybe
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 a -> (b -> a) -> Maybe b -> a
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 yes
totally-defined: Info
 reducible on all ground data terms