A computation that can fail with an error value; for when there is nothing exceptional about getting an error and the error should be handled sooner rather than later (or never).
A computation that can fail with an error value; for when there is nothing exceptional about getting an error and the error should be handled sooner rather than later (or never).
(err error)
Make a Result
that failed with error
.
Make a [[Result]] that failed with `error`.
(ok value)
Make a Result
that succeeded with value
.
Make a [[Result]] that succeeded with `value`.
(pure value)
Make a Result
that succeeded with value
.
Make a [[Result]] that succeeded with `value`.
A computation that can fail with an error value; for when there is nothing exceptional about getting an error and the error should be handled sooner rather than later (or never).
A computation that can fail with an error value; for when there is nothing exceptional about getting an error and the error should be handled sooner rather than later (or never).
(err? self)
Is self
an Err
?
Is `self` an [[Err]]?
(ok? self)
Is self
an Ok
?
Is `self` an [[Ok]]?
(result? self)
Is self
a Result
?
Is `self` a [[Result]]?
(run on-error on-success res)
If res
contains an error, call on-error
with the error. If res
is successful,
call on-success
with the contained value.
If `res` contains an error, call `on-error` with the error. If `res` is successful, call `on-success` with the contained value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close