Skip to content

Instantly share code, notes, and snippets.

@LCamel
Created November 25, 2011 06:35
Show Gist options
  • Save LCamel/1392940 to your computer and use it in GitHub Desktop.
Save LCamel/1392940 to your computer and use it in GitHub Desktop.
function f(x) { }
c = 7;
while (c > 0) {
r = Math.floor(Math.random() * 49);
if (! f(r)) {
console.log(r + 1);
f = function(r, f, x) { return x == r || f(x) }.bind(null, r, f);
c--;
}
}
/*
f = (function(r, f) {
return function(x) { return x == r || f(x) }
})(r, f);
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment