funcool / funcool/cats

Helpers for ensuring that values are wrapped in a certain type

Open
#133 11 comments 0 reactions 0 assignees View on GitHub
contributor friendly
Dominant language
Clojure
Stars
970
Forks
68
PR merge metrics
No merged PRs in 30d

Description

The counterparts of fns like `from-maybe`, take a value and ensure that they are wrapped in the correct type.

An example of how it'd behave for Maybe:

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

(maybe/to-maybe (maybe/just 42))
;; => #

(maybe/to-maybe 3)
;; => #

(maybe/to-maybe nil)
;; => #

(maybe/to-maybe (maybe/nothing))
;; => #
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.