Search code examples
clojuremonadsclojurescript

Can I use monads with clojurescript?


I know monads are available in clojure, but has anyone verified that they work in clojurescript?


Solution

  • Monads, the Functional programming method, only require a language with higher order functions and closures. You would need a ClojureScript monad library. Or you can go ahead and write your ClojureScript in a monadic style

    EDIT: by "monadic style" I was referring to writing and composing functions that take and return monadic values and implement the three monad laws. There are too many people better qualified to explain monads than I, so I will just link to one of my personal favorite videos on monads.