Thread:Pecoes/@comment-4674838-20121012013714/@comment-4674838-20121017065316

Pecoes wrote: How would you make sure the current - and not the future - value of someVariable is used?

By using a more ordinary closure (instead of a tricky one where a function is returning a function)?

Mathmagician wrote: I just want to use apply to pass an array of arguments, but I want to make sure the context stays unchanged just to be safe

Pecoes wrote: Wouldn't that be "this" ?

Nope.

The point? Whenever you use, you MUST be conscious of the context of   (methodName's  ), because you are forced to pass in a value for it. Being conscious of the context is an extra thing to think about that you normally needn't consider if you were just calling the ordinary way. I.e. using apply is trickier and requires more thinking.