> nope, you are limiting your object to have only one listener per event, I
think that's not quite how reality is. You gonna lose that listeners next
time somebody use same name with the same object.
true. For cases where that isn't enough, i assume you're thinking of
canceling from within the handler.
Here goes another attempt, preserving identity while providing a
self-reference.
let arg = ff=>{
let arg = {};
let f = ff(arg);
arg.callee = f;
return f;
};
let f = arg=>n=>n>1?n*arg.callee(n-1):1;
console.log(arg(f)(5));
Perhaps i'm going to run out of ideas soon, but my point is that it is
worth looking for less powerful alternatives that achieve the same ends.
Else we'd all be writing lisp, right?-)
Claus
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss