Re: What are closures, continuations?

From: [email protected]

One more question – what are lambdas? :wink:

Another name for anonymous functions - functions declared on the fly
without assigning them to some method or top-level variable.

JavaScript example:
// The argument to the ‘each’ method here is an anonymous function.
myArray.each( function(i){ alert(i) } );

Ruby example:

I’m making a brand new proc on the right side here

dir_watcher.on_modified = lambda{ |x| puts x }

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs