funcool / promesa

A promise library & concurrency toolkit for Clojure and ClojureScript.
https://funcool.github.io/promesa/latest/
Mozilla Public License 2.0
494 stars 57 forks source link

Applying non-functions #9

Closed moea closed 8 years ago

moea commented 8 years ago

Is it reasonable to expect this to work the same in cljs as it does on the JVM?

(-> {:x 1} p/promise (p/then :x))

Similarly for multimethods, and I guess everything which does evaluate to Function. One naive fix would be to have -map, -bind and -catch wrap all inputs in fn - do you think that's a bad idea? More than happy to make the change, if not.

niwinz commented 8 years ago

Great idea! The change is very welcome!