Created
February 2, 2013 02:15
-
-
Save monkyz/4695747 to your computer and use it in GitHub Desktop.
nasty code
This file contains hidden or 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
function addThree(x) {return x + 3;}; | |
function composed(func) { | |
return function(x) { | |
return func(func(x)) | |
} | |
}; | |
composed(addThree)(4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment