# r30483 - in docs/Perl6/Spec: . S32-setting-library

```Author: colomon
Date: 2010-04-27 18:36:16 +0200 (Tue, 27 Apr 2010)
New Revision: 30483```
```
Modified:
docs/Perl6/Spec/S03-operators.pod
docs/Perl6/Spec/S32-setting-library/Containers.pod
Log:
[Spec] Note that the various minmax methods, subs, and operators return a Range.

Modified: docs/Perl6/Spec/S03-operators.pod
===================================================================
--- docs/Perl6/Spec/S03-operators.pod   2010-04-27 14:46:45 UTC (rev 30482)
+++ docs/Perl6/Spec/S03-operators.pod   2010-04-27 16:36:16 UTC (rev 30483)
@@ -15,7 +15,7 @@

Created: 8 Mar 2004

Version: 201

@@ -1751,21 +1751,14 @@

C<< infix:<minmax> >>, the minmax operator

-    \$min0, \$max0 minmax \$min1, \$max1    # (\$min0 min \$min1, \$max0 max \$max1)
-
-The C<minmax> operator is for calculating both a minimum and maximum
-in a single expression.  Otherwise you'd have to write twice as
-
@a minmax @b

-you'd have to say something like
+Returns a C<Range> from the minimum element of C<@a> and C<@b> to the maximum
+element. C<Range> elements in the input9 are treated as if their
+minimum and maximum values were passed individually, except that if the
+corresponding C<excludes> flag is set in Range, the excludes flag is also set
+in the returned C<Range>.

-    (@a[0] min @b[0], @a[1] max @b[1])
-
-Note that there is no guarantee that the resulting minimum and maximum come
-from the same side.  The two calculations are bundled but independent.
-
=item *

C<< infix:<X> >>, the cross operator

Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod
===================================================================
--- docs/Perl6/Spec/S32-setting-library/Containers.pod  2010-04-27 14:46:45 UTC
(rev 30482)
+++ docs/Perl6/Spec/S32-setting-library/Containers.pod  2010-04-27 16:36:16 UTC
(rev 30483)
@@ -19,8 +19,8 @@

Created: 19 Feb 2009 extracted from S29-functions.pod

-    Version: 16
+    Version: 17

The document is a draft.

@@ -387,10 +387,13 @@
our multi minmax( Ordering @by,  *...@values )
our multi minmax( Ordering \$by,  *...@values )

-Returns the earliest (i.e., lowest index) minimum and maximum elements
-of C<@values> , using criteria C<\$by> or C<@by> for
-comparisons. C<@by> differs from C<\$by> in that each criterion
-is applied, in order, until a non-zero (tie) result is achieved.
+Returns a C<Range> from the minimum element of C<@values> to the maximum
+element, using criteria C<\$by> or C<@by> for comparisons. C<@by> differs from
+C<\$by> in that each criterion is applied, in order, until a non-zero (tie)
+result is achieved. C<Range> elements in C<@values> are treated as if their
+minimum and maximum values were passed individually, except that if the
+corresponding C<excludes> flag is set in Range, the excludes flag is also set
+in the returned C<Range>.

C<Ordering> is as described in L<"Type Declarations">.  Any
C<Ordering> may receive the mixin C<canonicalized(Code \$how)> to

```