Liking cljdoc? Tell your friends :D

yarop.core

Core namespace of the YAROP library.

Core namespace of the YAROP library.
raw docstring

=>cljmacro

(=> value & functions)

Railway thread first macro.

Creates a success result from value and applies to each function conditionally, as long as the result is successful.

Railway thread first macro.

Creates a success result from `value` and applies to each
function conditionally, as long as the result is successful.
sourceraw docstring

apply-if-successclj

(apply-if-success f [value err])

Given a function f (which returns result) and a result with value and err, applies the function to value if there is no error. Otherwise, passes the input result forward.

Given a function `f` (which returns result) and a result with
`value` and `err`, applies the function to `value` if there is
no error. Otherwise, passes the input result forward.
sourceraw docstring

errorclj

(error res)

Retrieves error from result.

Retrieves error from result.
sourceraw docstring

error->resultclj

(error->result e)

Returns a result with the given error e.

The value of the created result is set to nil.

Returns a result with the given error `e`.

The value of the created result is set to `nil`.
sourceraw docstring

failure?clj

(failure? res)

Checks to see if the result represents a failure?

A result is considered failure if the error is not nil, regardless of the value.

Checks to see if the result represents a failure?

A result is considered failure if the error is
not `nil`, regardless of the value.
sourceraw docstring

resultclj

(result v e)

Constructs a result with the given value v and error e.

Constructs a result with the given value `v` and error `e`.
sourceraw docstring

success?clj

(success? res)

Checks to see if the result represents a success?

A result is considered successful if the error is nil, regardless of the value.

Checks to see if the result represents a success?

A result is considered successful if the error is
`nil`, regardless of the value.
sourceraw docstring

valueclj

(value res)

Retrieves value from result.

Retrieves value from result.
sourceraw docstring

value->resultclj

(value->result v)

Returns a successful result with the given value v.

Returns a successful result with the given value `v`.
sourceraw docstring

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

× close