On Mon, Dec 15, 2008 at 5:41 PM, Moritz Lenz <mor...@faui2k3.org> wrote:

> I know at least of infix:<cmp>(Num $a, Num $b) (which does the same as
> Perl 5's <=>) and infix:<cmp>(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 currently:

>  (a => 2) cmp (a => 10)
>
Multiple Dispatch: No suitable candidate found for 'cmp', with signature
> 'PP->I'
>

Pugs DWIMs with numbers and string-valued pairs, but it looks like
num-valued pairs get their values stringified:

> pugs> 2 cmp 10
>
-1
>
pugs> (a => 2) cmp (a => 10)
>
1
>


-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to