Skip to content

Instantly share code, notes, and snippets.

@norswap
norswap / why.js
Created September 1, 2019 16:20
Y Combinator and Trampolines in Javascript
const assert = require('assert');
// const is_even = n =>
// (n === 0) || !is_even(n - 1);
const mock_is_even = (myself, n) =>
(n === 0) || !myself(myself, n - 1);
const mockingbird =
fn =>