Author: moritz Date: 2008-12-13 10:32:15 +0100 (Sat, 13 Dec 2008) New Revision: 24325
Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] List.sort with a unary or nullary code object does a Schwartzian Transform. (Feel free to improve the wording) Modified: docs/Perl6/Spec/S29-functions.pod =================================================================== --- docs/Perl6/Spec/S29-functions.pod 2008-12-13 00:57:48 UTC (rev 24324) +++ docs/Perl6/Spec/S29-functions.pod 2008-12-13 09:32:15 UTC (rev 24325) @@ -13,8 +13,8 @@ Mark Stosberg <m...@summersault.com> Carl Mäsak <cma...@gmail.com> Date: 12 Mar 2005 - Last Modified: 19 Nov 2008 - Version: 30 + Last Modified: 13 Dec 2008 + Version: 31 This document attempts to document the list of builtin functions in Perl 6. It assumes familiarity with Perl 5 and prior synopses. @@ -870,6 +870,10 @@ comparisons. C<@by> differs from C<$by> in that each criterion is applied, in order, until a non-zero (tie) result is achieved. +If C<$by> is a code object of arity zero or one, it is applied on each item +of C<@values>, and C<@values> is sorted by comparing the result values with +C<< &infix:<cmp> >> (Schwartzian Transform). + C<Ordering> is as described in L<"Type Declarations">. Any C<Ordering> may receive either or both of the mixins C<descending> and C<canon(Code $how)> to reverse the order of sort, or