type Try<e, a> = either { .err e, .ok a, }
A value that is either .ok a or .err e.
Try<e, a> carries either .ok a or .err e.
.ok a means a successful result..err e means an error has occurred.type Try<e, a> = either { .err e, .ok a, }
A value that is either .ok a or .err e.
Keeps a successful value only if it satisfies the predicate, otherwise replaces it with the provided error.
Transforms the .ok value with a computation that may itself fail.
Transforms the .ok value, if present.
Transforms the .err value, if present.
Extracts the .ok branch from a Try<either {}, a>.
Converts .ok value to a singleton list and .err _ to an empty list.
Converts .ok value to .some value and .err _ to .none!.