in reply to [Perl 6] Generalized shortcutting C<||>?
map { some_condition ? $_ : some_default } some_expression;
is much clearer to me than
some_expression ||| { some_condition }, some_default
The syntax and operand order is confusingly dissimilar to the exiting ternary operator.
some_condition ? some_expression : some_default
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [Perl 6] Generalized shortcutting C<||>?
by blazar (Canon) on Jul 26, 2007 at 13:59 UTC | |
by Roy Johnson (Monsignor) on Jul 26, 2007 at 17:32 UTC |