6 ms·
If you're interested in doing some of this stuff in JS, there's sweet.js[1] for macros. I've also implemented some similar stuff as libraries: adt.js[2], matche
by natefaubion 13y ago
If you're interested in doing some of this stuff in JS, there's sweet.js[1] for macros. I've also implemented some similar stuff as libraries: adt.js[2], matches.js[3], and tailrec.js[4]. By implementing them as libraries, I've given up some of the nicety of native-looking syntax, but it requires no preprocessing and only ES3.
[1] http://sweetjs.org/ http://sweetjs.org/
[2] https://github.com/natefaubion/adt.js https://github.com/natefaubion/adt.js
[3] https://github.com/natefaubion/matches.js https://github.com/natefaubion/matches.js
[4] https://github.com/natefaubion/tailrec.js https://github.com/natefaubion/tailrec.js