I know how to do this in every other language that I know, but I'm just starting Lisp and not quite getting it. My idea of
- make a list of characters
- convert to ascii values
- sort
- convert back to characters
- convert back to a string
Seems heavy-handed. Is there some better way to do this? I'm trying to write a function that, given a string, returns a string with the letters sorted. So, for example:
gate => aegt
house => ehosu
door => door
This routine will be used as part of an anagram-finder.
Thanks!
#'char-lessp
preferred over#'char<
, or is that just a stylistic thing? – Fellah