Liking cljdoc? Tell your friends :D

cats.monad.maybe

The Maybe monad implementation and helpers functions for working with maybe related types.

(require '[cats.monad.maybe :as maybe])

(maybe/just 1)
;; => #<Just [1]>
The Maybe monad implementation and helpers functions
for working with maybe related types.

    (require '[cats.monad.maybe :as maybe])

    (maybe/just 1)
    ;; => #<Just [1]>
raw docstring

from-maybeclj/s

(from-maybe mv)
(from-maybe mv default)

Return inner value from maybe monad.

This is a specialized version of cats.core/extract for Maybe monad types that allows set up the default value.

Let see some examples:

(from-maybe (just 1))
;=> 1

(from-maybe (nothing))
;=> nil

(from-maybe (nothing) 42)
;=> 42
Return inner value from maybe monad.

This is a specialized version of `cats.core/extract`
for Maybe monad types that allows set up
the default value.

Let see some examples:

    (from-maybe (just 1))
    ;=> 1

    (from-maybe (nothing))
    ;=> nil

    (from-maybe (nothing) 42)
    ;=> 42
sourceraw docstring

Justcljs

source

justclj/s

(just)
(just v)

A Just type constructor.

Without arguments it returns a Just instance with nil as wrapped value.

A Just type constructor.

Without arguments it returns a Just instance
with nil as wrapped value.
sourceraw docstring

just?clj/s

(just? v)

Returns true if v is an instance of Just type.

Returns true if `v` is an instance
of `Just` type.
sourceraw docstring

maybe-transformerclj/s

(maybe-transformer inner-monad)

The maybe transformer constructor.

The maybe transformer constructor.
sourceraw docstring

maybe?clj/s

(maybe? v)

Return true in case of v is instance of Maybe monad.

Return true in case of `v` is instance
of Maybe monad.
sourceraw docstring

Nothingcljs

source

nothingclj/s

(nothing)

A Nothing type constructor.

A Nothing type constructor.
sourceraw docstring

nothing?clj/s

(nothing? v)

Returns true if v is an instance of Nothing type or is nil.

Returns true if `v` is an instance
of `Nothing` type or is nil.
sourceraw docstring

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

× close