Damian Conway wrote: > > How about > > > > %students : ( sort = $$students{^1}{GPA} <=> $$students{^0}{GPA} }); > > Weeeeeeird! :-) > > Since you've strayed so close, why not go all the way and make it an attribute: > > my %students : sorted( $ME{^1}{GPA} <=> $ME{^0}{GPA} ); > > Where the C<sorted> attribute takes a block/sub ref/h.o.f. that expects > to compare two keys, which would be passed as arguments. Note too the > (now generalized) use of the proposed $ME variable. > Yes, I was thinking the same thing. Except the '$ME' thing--what's that? (I must have missed that discussion...) What's wrong with @_?
- RFC 124 (v1) Sort order for any hash Perl6 RFC Librarian
- Re: RFC 124 (v1) Sort order for any hash Tom Hughes
- Re: RFC 124 (v1) Sort order for any hash Hildo Biersma
- Re: RFC 124 (v1) Sort order for any hash Hildo Biersma
- Re: RFC 124 (v1) Sort order for any hash Jonathan Scott Duff
- Re: RFC 124 (v1) Sort order for any h... David L. Nicol
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- Re: RFC 124 (v1) Sort order for any hash David L. Nicol
- Re: RFC 124 (v1) Sort order for any hash David L. Nicol
- Re: RFC 124 (v1) Sort order for any hash Damian Conway
- Re: RFC 124 (v1) Sort order for any h... Jeremy Howard
- Re: RFC 124 (v1) Sort order for any h... Damian Conway
- Re: RFC 124 (v1) Sort order for ... David L. Nicol
- Re: RFC for $ME class variable ... Damian Conway
- Re: RFC for $ME class variab... Randal L. Schwartz
- Re: RFC for $ME class va... John Siracusa
- Re: RFC for $ME class va... Damian Conway
- Re: RFC for $ME class va... John Siracusa
- Re: RFC for $ME class va... Nathan Wiger
- Re: RFC for $ME class va... Bart Lateur
- Re: RFC for $ME class va... Nathan Wiger