shortening an example in the docs

Karen Lanrap karen at digitaldaemon.com
Tue Oct 3 23:18:49 PDT 2006


In the lazy evaluation page it says:

bool scase(bool b, lazy void dg)
{
    if (b)
    {	dg();
	return true;
    }
    return false;
}


That is somehow unnecessary doubled precision. The following code
should do the same: 

bool scase(bool b, lazy void dg)
{
    if (b) dg();
    return b;
}



More information about the Digitalmars-d-bugs mailing list