Passing lazy parmeters to functions that take lazy parameters

Joe Gottman jgottman at carolina.rr.com
Mon Sep 4 15:31:38 PDT 2006


"Walter Bright" <newshound at digitalmars.com> wrote in message 
news:edi8s6$olu$1 at digitaldaemon.com...
> Joe Gottman wrote:
>> Suppose I have a function f that has a lazy parameter x, and I pass it 
>> into another function g that has a lazy parameter.  Will x be evaluated 
>> when it is passed to g?
>
> No, it isn't evaluated. The evaluation of it is wrapped up into another 
> delegate and passed to g.

OK.  So what's the best way to force evaluation?  Would just mentioning it 
in a line by itself work?

Joe Gottman 





More information about the Digitalmars-d mailing list