Adam D. Ruppe <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #8 from Adam D. Ruppe <> 2012-07-29 
07:51:55 PDT ---
// this is your sugar!
string yield(string what) { return `if(auto result = dg(`~what~`)) return
result;`; }

Now, every time you would write

        result = dg(y);
        if (result)
            return result;

instead write:


Or mixin(yield("i, y")); if you have multiple arguments.

And the boilerplate is way down. Since you keep result around,
you'll want to make it just if(result) instead of if(auto result),
but the idea is the same.

We might be able to make a class template or a mixn for
yield(int) hanoiTower() too, but writing int opApply(...)
isn't too bad.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to