Anonymous user
Quoting constructs: Difference between revisions
→Blocks
(→Blocks) |
|||
Line 432:
====Blocks====
Somewhat between literal constants and instantiated object are blocks, which represent a closure (lambda function). Here, the
Blocks thus represent a piece of code which can be stored in an instance variable, passed as argument or returned from a method.
<br>Block syntax is very compact:
|