in reply to Re: Golf Question - Shortest way to write while inside while
in thread Golf Question - Shortest way to write while inside while
Bugs:
Golf
sub w(&$){&{$_[1]}while&{$_[0]}}sub d(&){$_[0]} # then, instead of while (foo) { bar }, w{foo}d{bar};
sub l(&){{&{$_[0]};redo}}sub w{$_[0]||last} # then, instead of while (foo) { bar }, l{w foo;bar};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Golf Question - Shortest way to write while inside while
by ambrus (Abbot) on Nov 08, 2007 at 10:16 UTC |