Re:How Ruby Borrowed a Decades Old Idea From Lisp
by mseepgood on Tuesday September 18, 2012 @01:47PM
(#4539487)
> but I didn't know it had a block/closure syntax also
Blocks are one of the most important concepts of Smallalk. Every control structure is done via blocks in Smalltalk, even if/else is a method (message) on a boolean object, that takes two blocks as arguments: one for the 'true' case and one for the 'false' case.
Blocks are one of the most important concepts of Smallalk. Every control structure is done via blocks in Smalltalk, even if/else is a method (message) on a boolean object, that takes two blocks as arguments: one for the 'true' case and one for the 'false' case.