Name Last modified Size Description
Parent Directory -
_darcs/ 05-Aug-2006 18:31 -
schwartzian.io 05-Aug-2006 13:07 1.9K
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:
files sortKey(lastInfoChangeDate)files sortKey(file, file lastInfoChangeDate)Three forms of sort are supported:
files sortKey(…) sortfiles sortKey(…) sort(<)files sortKey(…) sort(x, y, x < y)