in reply to Re: 99 Problems in Perl6
in thread 99 Problems in Perl6
Update: I think the if is way too long, but can't remember if there's a context-safe way to return nothing in Perl 6 (that isn't "fail"), to golf out the "return" and say something like return $x ne $previous ?? $x !! $NOTHING_AT_ALL;. In the current application () is probably safe.sub compress ($x) { state $previous; if $x ne $previous { return $x; } else { return; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: 99 Problems in Perl6
by Ovid (Cardinal) on Dec 15, 2006 at 22:29 UTC | |
by chromatic (Archbishop) on Dec 16, 2006 at 00:06 UTC | |
by gaal (Parson) on Dec 15, 2006 at 22:39 UTC | |
by Ovid (Cardinal) on Dec 15, 2006 at 22:44 UTC | |
by gaal (Parson) on Dec 15, 2006 at 22:54 UTC | |
by TimToady (Parson) on Dec 15, 2006 at 23:31 UTC | |
|