You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val isNone : 'a option -> bool
val fold : ('a * 'b -> 'b) -> 'b -> 'a option -> 'b
Description
isNone opt
returns true if opt is NONE and false otherwise.
fold f init opt
returns init if opt is NONE and f(x, init) if opt is SOME x.
Discussion
Since isSome is part of the pervasive environment, isNone should also be
visible without qualification.
Rationale
The isNone function provides a convienient test that was omitted from the original
Basis Library.
Likewise, the fold function fills a hole in the specification.