Calling anonymous delegate recursively ?

tsukikage tsukikage at gmail.com
Sat Jan 8 07:45:52 PST 2011


eg. to return a fibonacci delegate:

return (ulong m) {
         if(m < 2) return m ;
         return _self_ref(m-1)+_self_ref(m-2) ;
     } ;

Is it possible? Thank you!


More information about the Digitalmars-d-learn mailing list