parameterized lazy expression

freeagle dalibor.free at gmail.com
Tue Oct 2 12:25:33 PDT 2007


Hello,

is it possible somehow, to pass as a lazy argument expression with 
argument/s?

something like
foo((int x) x == 0);

where x will be passed as parameter to the exp inside the foo function:

void foo(lazy bool dg)
{
	if(dg(10)) {...}
}


i'd like not to have to use foo(bool delegate(int x) {return x == 0}) if 
possible

I hope i made myself clear, thanks for advices in advance :)

freeagle




More information about the Digitalmars-d-learn mailing list