Zundra Daniel wrote: > I think what Dave was trying to illustrate with this example is that > even > though the method that you're calling has gone out of scope that it > still > retains the value of the variable defined inside. > > Whats fascinating about this simple example is the fact that the method > which is assigned to a remembers the context of everything defined > internally. Think about that for a second. In languages that do not > support closures the values of the properties defined are lost until the > next time the method is called, however closures not only remember the > values of their properties after the function goes out of scope but the > context in which they were originally defined. Its a pretty simple > concept > but a very powerful one at the same time. Sounds like I was trying to overcomplicate it, when it's just blindingly obvious.. Okay. I'll try to play with that and see how far I can take it. Thanks :) -- Posted via http://www.ruby-forum.com/.