3 ms·
If something this powerful was reasonable to do in javascript, it would be mainstream knowledge by now. Clojurescript's core.async is a macro approach which is
by dustingetz 13y ago
If something this powerful was reasonable to do in javascript, it would be mainstream knowledge by now.
Clojurescript's core.async is a macro approach which is not quite the same but very similar to what I describe.
You could probably do it in sweet.js (marcos for javascript that are expanded at compile time) but as far as I know, nobody is actually doing it so there are probably showstoppers.
A monadic approach requires all of your code to be pure-functional, which is unreasonable because you'd have to rewrite all of your dependencies to be pure.