Custom Blocks
Lutger
lutger.blijdestijn at gmail.com
Tue Aug 10 10:55:35 PDT 2010
Chris Williams wrote:
...
> That brings us to the second problem. Our last parameter for a custom
> block is always "void delegate()" and our return is always void.
> There's nothing to be gained by forcing the coder to write both.
>
ruby blocks have a special syntax for block parameters and foreach in D has it
too. It could look like:
void until(int limit, void delegate(int) dg);
until(5 ; i) {
...
}
But maybe that is too weird, I dunno. Parameters are reversed here too wrt
foreach.
More information about the Digitalmars-d
mailing list