Skip to content

Instantly share code, notes, and snippets.

View 0tza's full-sized avatar

Othman Azil 0tza

View GitHub Profile
@0tza
0tza / impdec.js
Last active April 29, 2019 10:41 — forked from vastus/impdec.js
Imperative and declarative
/*
* Notes
*
* Make sure you know the size of your data and use proper functions or style
* to not introduce bottlenecks by mistake.
*
* If we get inlined functions to Node/JS, using declarative programs will be
* almost as fast as imperative ones by the magic of transducers. Transducers
* will do a single pass (reduce) on the input with the composition of the
* given transformation functions.