Liking cljdoc? Tell your friends :D

com.unbounce.treajure.either


eitherclj

(either on-left on-right val0)

Evaluates val0' a monadic sub-routine of type Either, and callson-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
sourceraw docstring

from-leftclj

(from-left def e)

Unwraps Either value when it is left, otherwise return def

Unwraps Either value when it is left, otherwise return def
sourceraw docstring

from-rightclj

(from-right def e)

Unwraps Either value when it is right, otherwise return def

Unwraps Either value when it is right, otherwise return def
sourceraw docstring

leftclj

(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
sourceraw docstring

left-mapclj

(left-map f val)

Calls f' on the wrapped Either value when wrapper is aleft'

Calls `f' on the wrapped Either value when wrapper is a `left'
sourceraw docstring

left?clj

(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)
sourceraw docstring

or-elseclj

(or-else es)

Returns first Right value from seq

Returns first Right value from seq
sourceraw docstring

or-else*clj

(or-else* e0 & rem0)

Returns first argument that has a Right value

Returns first argument that has a Right value
sourceraw docstring

(right val)

Wraps val on an Either's right value

Wraps val on an Either's right value
sourceraw docstring

right?clj

(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)
sourceraw docstring

run-eitherclj

(run-either action)

Evaluates a monadic sub-routine of type Either

Evaluates a monadic sub-routine of type Either
sourceraw docstring

try-eithercljmacro

(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 aright' 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 aleft' 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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close