funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
2021-03-24T12:04:56.002300Z

There would be any motivation to build such thing using cats as:

(require '[cats.core :as m]
         '[cats.monad.either :as me])

(defmacro flow->
  [state & forms]
  `(m/>>=
    (me/right ~state)
    ~@(for [form forms]
        (if (seq? form)
          `(fn [~'x] (~(first form) ~'x ~@(rest form)))
          form))))

2021-03-24T12:05:05.002500Z

?