:: Maybe a -> a package:rio
The
fromJust function extracts the element out of a
Just
and throws an error if its argument is
Nothing.
Examples
Basic usage:
>>> fromJust (Just 1)
1
>>> 2 * (fromJust (Just 10))
20
>>> 2 * (fromJust Nothing)
*** Exception: Maybe.fromJust: Nothing
O(1) First element without checking if the vector is empty
O(1) Last element without checking if the vector is empty
The largest element of a non-empty structure.
The least element of a non-empty structure.