Re: How can I sort symbols in alphabetical order?



"Mattias Nilsson" <mattiasn@xxxxxxxxxxxx> writes:
> (sort '(car window apple) #'string< :key #'symbol-name)

grue@xxxxxxx (Timofei Shatrov) writes:
> (sort '(car window apple)
> (lambda (x y) (string< (symbol-name x) (symbol-name y))))

Note that sort is advertised as a destructive function, and you pass
it a quoted object.
.



Relevant Pages