Skip to content

Instantly share code, notes, and snippets.

@AyaMorisawa
Last active August 29, 2015 14:18
Show Gist options
  • Save AyaMorisawa/c44ce626f9f8b84947dc to your computer and use it in GitHub Desktop.
Save AyaMorisawa/c44ce626f9f8b84947dc to your computer and use it in GitHub Desktop.
piyo = (f, x) -->
| f x => 1 + piyo f, f x
| _ => 0
/* piyo.js
var piyo = function(f) {
return function(x) {
return f(x) ? 1 + piyo(f)(f(x)) : 0;
};
};
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment