We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
The counterparts of fns like from-maybe, take a value and ensure that they are wrapped in the correct type.
from-maybe
An example of how it'd behave for Maybe:
(require '[cats.monad.maybe :as maybe]) (maybe/to-maybe (maybe/just 42)) ;; => #<Just 42> (maybe/to-maybe 3) ;; => #<Just 3> (maybe/to-maybe nil) ;; => #<Nothing> (maybe/to-maybe (maybe/nothing)) ;; => #<Nothing>