Skip to content

Instantly share code, notes, and snippets.

@irohiroki
Created July 2, 2012 04:05
Show Gist options
  • Save irohiroki/3031017 to your computer and use it in GitHub Desktop.
Save irohiroki/3031017 to your computer and use it in GitHub Desktop.
The K combinator in JavaScript
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.
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