Create a Maybe instance which is a Just.
Maybe
Just
null and undefined are allowed by the type signature so that the function may throw on those rather than constructing a type like Maybe<undefined>.
null
undefined
throw
Maybe<undefined>
The type of the item contained in the Maybe.
The value to wrap in a Maybe.Just.
Maybe.Just
An instance of Maybe.Just<T>.
Maybe.Just<T>
If you pass null or undefined.
Create an instance of Maybe.Just.
Create a
Maybe
instance which is aJust
.null
andundefined
are allowed by the type signature so that the function maythrow
on those rather than constructing a type likeMaybe<undefined>
.Template: T
The type of the item contained in the
Maybe
.Param: value
The value to wrap in a
Maybe.Just
.Returns
An instance of
Maybe.Just<T>
.Throws
If you pass
null
orundefined
.