(either on-left on-right val0)
Evaluates val0' a monadic sub-routine of type Either, and calls
on-left' or
`on-right' depending on the resulting Either value
Evaluates `val0' a monadic sub-routine of type Either, and calls `on-left' or `on-right' depending on the resulting Either value
(from-left def e)
Unwraps Either value when it is left, otherwise return def
Unwraps Either value when it is left, otherwise return def
(from-right def e)
Unwraps Either value when it is right, otherwise return def
Unwraps Either value when it is right, otherwise return def
(left val)
Wraps val on an Either's left value, normally corresponds to an error value
Wraps val on an Either's left value, normally corresponds to an error value
(left-map f val)
Calls f' on the wrapped Either value when wrapper is a
left'
Calls `f' on the wrapped Either value when wrapper is a `left'
(left? val)
Checks if `val' corresponds to an Either's left value. If it receives a monadic sub-routine it will evaluate it, careful if your monadic sub-routine performs side-effects)
Checks if `val' corresponds to an Either's left value. If it receives a monadic sub-routine it _will_ evaluate it, careful if your monadic sub-routine performs side-effects)
(or-else es)
Returns first Right value from seq
Returns first Right value from seq
(or-else* e0 & rem0)
Returns first argument that has a Right value
Returns first argument that has a Right value
(right val)
Wraps val on an Either's right value
Wraps val on an Either's right value
(right? val)
Checks if `val' corresponds to an Either's right value. If it receives a monadic sub-routine it will evaluate it, careful if your monadic sub-routine performs side-effects)
Checks if `val' corresponds to an Either's right value. If it receives a monadic sub-routine it _will_ evaluate it, careful if your monadic sub-routine performs side-effects)
(run-either action)
Evaluates a monadic sub-routine of type Either
Evaluates a monadic sub-routine of type Either
(try-either io-action)
(try-either io-action on-failure)
Performs a call that might fail and wraps its result on an Either.
When the call throws an exception, the exception is wrapped on a left' value; otherwise a
right' value is returned.
When an on-failure' function is given, it will be called with the received exception, and the returned value is returned wrapped on a
left' value
Performs a call that might fail and wraps its result on an Either. When the call throws an exception, the exception is wrapped on a `left' value; otherwise a `right' value is returned. When an `on-failure' function is given, it will be called with the received exception, and the returned value is returned wrapped on a `left' value
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close