Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Suggestion: minmax operator

8 views
Skip to first unread message

Joe Gottman

unread,
Jan 10, 2007, 12:45:01 AM1/10/07
to Perl6
Since Perl6 is going to have infix min and max operators, it might be
a good idea to have an infix minmax operator, defined by
$a minmax $b === ($a min $b), ($a max B); #2-element list

This would be especially useful as a reduction operator:
my ($min, $max) = [minmax]@inputs;

Joe Gottman

0 new messages