Created
October 22, 2016 20:48
-
-
Save EthanJWright/5b1cf38d6167b8d28fb75cfaad7c3b4e to your computer and use it in GitHub Desktop.
test this jsy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const x = function w(z) { | |
return ((z > 0) ? 0 : 1); | |
}; | |
const g = (y) => { return x(y) && y; } | |
const f = function factorial(n) { | |
const c = (n === 0) ? 1 : (n * factorial(n - 1)); | |
return c && g(c); | |
}; | |
const h = function d(i) { | |
return (i > 100) ? (i / 10) : i; | |
}; | |
const apply = function(lambda) { | |
return lambda(lambda(8)); | |
}; | |
console.log(apply(function(x) { | |
return x * x; | |
})); | |
console.log(h(f(10))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment