Created
July 2, 2012 04:05
-
-
Save irohiroki/3031017 to your computer and use it in GitHub Desktop.
The K combinator in JavaScript
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
This is a leaner version of K combinator and can be included directly by a script tag. | |
See https://gist.github.com/7727 for a mature one. |
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
K = function(x, y){ | |
y(x); | |
return x; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment