Index of /io/schwartzian

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [DIR] _darcs/ 05-Aug-2006 18:31 - [   ] schwartzian.io 05-Aug-2006 13:07 1.9K

A decorate-sort-undecorate operation for Io

Specify a key for each item, and control how the keys are compared.

Io> 1 to(10) asList sortKey(x, -(1)^(x) * x) sort
==> list(9, 7, 5, 3, 1, 2, 4, 6, 8, 10)

Io> Directory with(".") files sortKey(lastInfoChangeDate) sort map(name)
==> … listing of directory sorted by date

Two forms of sortKey are supported:

Three forms of sort are supported: