RosettaCodeData/Task/Sort-an-array-of-composite-structures/Common-Lisp/sort-an-array-of-composite-structures-2.lisp
2023-07-01 13:44:08 -04:00

2 lines
139 B
Common Lisp

CL-USER> (sort (copy-list *test-scores*) #'string-lessp :key #'first)
(("california" 76.2) ("new york" 88.2) ("ohio" 87.8) ("texas" 68.9))