October 04, 2006 shortening an example in the docs | ||||
---|---|---|---|---|
| ||||
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; } |
October 04, 2006 Re: shortening an example in the docs | ||||
---|---|---|---|---|
| ||||
Posted in reply to Karen Lanrap | You're right. |
Copyright © 1999-2021 by the D Language Foundation