By vidarh
via hokstad.com
Published: May 06 2008 / 09:25
Sixth in my series on writing a compiler in Ruby: "How about some deferred evaluation and anonymous functions?
Lambdas, or anonymous functions, can be passed around like values and called at your convenience (or not at all). Generally, they can access variables from the surrounding scope that gets "bound" to the function as an environment that allows it to pass state. That's a closure. What we're going to do this time is not going to bring full closure support, but it's the start, and we'll get to full closures down the road."



Add your comment