let cons = (a, b) => (pick) => ({1: a, 2: b}[pick]); let car = (x) => x(1); let cdr = (x) => x(2); What if we could build pairs out of nothing at all?…
`yield` vs `yield*` in Koa.js
Although Koa.js does not advocate the use of yield*, it is good there is an article explaining the difference among the two.…
Promises and Generators: control flow utopia
Forbes Lindesay talks about how ES6 generators can help you make your asynchronous code easier to understand in terms of synchronous concepts. He discusses the alternative values you can use to represent a future and how they are all ultimately promises. Slides here.…
Practical examples of monads in JS
Nice article introducing practical examples of monads in JS (ES6).…
ES6 Generators in one picture
Source…