public function testWhoCares() { $x = callFresh(function ($q) { return fives($q); }); $result = $x(emptyState()); $this->assertEquals('((((#(0) . 5)) . 1))', sprintf('%s', take(1, $result))); }
function fives($x) { return disj(eq($x, 5), function ($aC) use($x) { return function () use($x, $aC) { $f = fives($x); return $f($aC); }; }); }