Full closures

Bruno Medeiros brunodomedeiros+spam at com.gmail
Mon Aug 18 09:00:27 PDT 2008


BCS wrote:
> 
> That is a good point, but how else you you get a real closure that has 
> mutable state?
> 
> int delegate() Seq()
> {
>   int at = 0;
>   int Next() { return at++; }
>   return &Next;
> }
> 
> 

Err.... just have a closure like D has now?... one that allows access to 
any visible variable?

-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list