in reply to Re^3: sort +*, @array
in thread sort +*, @array
say sort +*.value, 1=>4, 11=>5, 2=>99, 22=>22, 3=>339 # prints 1=>4 11=>5 22=>22 2=>99 3=>339 say sort ~*.value, 1=>4, 11=>5, 2=>99, 22=>22, 3=>339 # prints 22=>22 3=>339 1=>4 11=>5 2=>99
(And of course the results of the closure call on a given item is memoized.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: sort +*, @array
by hdb (Monsignor) on Dec 09, 2013 at 14:26 UTC |