[OT] Converting booleans to numbers
Steven Schveighoffer
schveiguy at yahoo.com
Thu Sep 21 19:57:19 UTC 2017
On 9/21/17 3:24 PM, Timon Gehr wrote:
> This is a good alternative, maybe arrange it like this:
>
> dfs(a + 1, b); dfs(a, b + 1);
> dfs(a - 1, b); dfs(a, b - 1);
Yes, better!
> Just need to make sure no code is duplicated. (For example, there could
> be more work to do in each loop iteration, and then you'd need to use a
> local function.)
Hm... I suppose you would do that work at the beginning of dfs, like you
check the limits?
-Steve
More information about the Digitalmars-d-learn
mailing list