On Mon, Dec 15, 2008 at 11:18:54PM -0500, Mark J. Reed wrote:
> On Mon, Dec 15, 2008 at 5:41 PM, Moritz Lenz wrote:
> > I know at least of infix:(Num $a, Num $b) (which does the same as
> > Perl 5's <=>) and infix:(Pair $a, Pair $b) (which does $a.key cmp
> > $a.key || $a.value cmp $b.value), so n
On Mon, Dec 15, 2008 at 5:41 PM, Moritz Lenz wrote:
> I know at least of infix:(Num $a, Num $b) (which does the same as
> Perl 5's <=>) and infix:(Pair $a, Pair $b) (which does $a.key cmp
> $a.key || $a.value cmp $b.value), so numbers and pairs DWIM.
Hm. Rakudo doesn't let me cmp pairs at all
Uri Guttman wrote:
>> "LW" == Larry Wall writes:
>
> >>> infix: does numeric comparison if both operands are numbers, and
> >>> string comparison otherwise.
>
> LW> That is a bit of an oversimplification.
>
> LW> Any type may define infix: however it likes for two arguments of
>
> "LW" == Larry Wall writes:
>>> infix: does numeric comparison if both operands are numbers, and
>>> string comparison otherwise.
LW> That is a bit of an oversimplification.
LW> Any type may define infix: however it likes for two arguments of
LW> its own type. It may also defin
>> infix: does numeric comparison if both operands are numbers, and
>> string comparison otherwise.
That is a bit of an oversimplification.
> "Cmp" (like "eqv") depends on the particular type, so to sort a certain
> way, you should need only to coerce the values to the right type:
>
> @st
On 2008-Dec-14, at 11:21 am, Moritz Lenz wrote:
Uri Guttman wrote:
how is sort ordering specified?
Currently it is not specified, it defaults to infix:. If you
can suggest a non-confusing way to specify both a transformation
closure and a comparison method, please go ahead.
how does it k
Uri Guttman wrote:
>> "p" == pugs-commits writes:
>
> p> This document attempts to document the list of builtin functions in
> Perl 6.
> p> It assumes familiarity with Perl 5 and prior synopses.
> p> @@ -870,6 +870,10 @@
> p> comparisons. C<@by> differs from C<$by> in that each c
> "p" == pugs-commits writes:
p> This document attempts to document the list of builtin functions in Perl
6.
p> It assumes familiarity with Perl 5 and prior synopses.
p> @@ -870,6 +870,10 @@
p> comparisons. C<@by> differs from C<$by> in that each criterion is
p> applied, in or