Skip to content

Instantly share code, notes, and snippets.

@tario
Created May 5, 2016 21:42
Show Gist options
  • Save tario/80f74feaae2d9a049c5bcff5d54999e3 to your computer and use it in GitHub Desktop.
Save tario/80f74feaae2d9a049c5bcff5d54999e3 to your computer and use it in GitHub Desktop.
var z1 = function(value) {
console.log(value);
};
var print = function(str) {
return function(){
console.log(str);
};
};
var fizz = print("Fizz");
var buzz = print("Buzz");
var fizzbuzz = print("FizzBuzz");
var llamar = function(x, value) {
x.c(value);
llamar(x.n, value+1);
};
var denuevo = {
c: z1
};
var x={c:z1,n:{c:z1,n:{c:fizz,n:{c:z1,n:{c:buzz,n:{c:fizz,n:{c:z1,n:{c:z1,n:{c:fizz,n:{c:buzz,n:{c:z1,n:{c:fizz,n:{c:z1,n:{c:z1,n:{c:fizzbuzz,n:denuevo}}}}}}}}}}}}}}};
denuevo.n = x.n;
llamar(x,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment