Liking cljdoc? Tell your friends :D

monnit.option

A computation that can fail to produce a meaningful result; a more robust alternative to returning a value that may be nil.

A computation that can fail to produce a meaningful result; a more robust
alternative to returning a value that may be `nil`.
raw docstring

noneclj/s

An instance of None.

An instance of [[None]].
sourceraw docstring

Noneclj/s≠

cljs

An Option that contains no value.

An [[Option]] that contains no value.
sourceraw docstring

Optionclj/sprotocol

A computation that can fail to produce a meaningful result; a more robust alternative to returning a value that may be nil.

A computation that can fail to produce a meaningful result; a more robust
alternative to returning a value that may be `nil`.

-run-optionclj/s

(-run-option self default f)

run with the Option first. An implementation detail; call run instead.

[[run]] with the [[Option]] first. An implementation detail; call [[run]]
instead.

none?clj/s

(none? self)

Is self a None?

Is `self` a [[None]]?

option?clj/s

(option? self)

Is self an option (Some or None)?

Is `self` an option ([[Some]] or [[None]])?

some?clj/s

(some? self)

Is self a Some?

Is `self` a [[Some]]?
sourceraw docstring

pureclj/s

(pure v)

Wrap v into a Some.

Wrap `v` into a [[Some]].
sourceraw docstring

runclj/s

(run default f e)

Apply f to the contents of self if (some? self) and return default if (none? self).

Apply `f` to the contents of `self` if `(some? self)` and return `default` if `(none? self)`.
sourceraw docstring

Someclj/s≠

cljs

An Option that contains a value.

An [[Option]] that contains a value.
sourceraw docstring

someclj/s

(some v)

Wrap v into a Some.

Wrap `v` into a [[Some]].
sourceraw docstring

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

× close