Q&A's, tips, howto's
-
cameyo
- Posts: 183
- Joined: Sun Mar 27, 2011 3:07 pm
- Location: Italy
-
Contact:
Post
by cameyo »
How to sort a list containing
nil and
true symbols?
Code: Select all
(setq a '(nil true b a))
(sort a)
;-> (nil true a b)
Thanks
-
cameyo
- Posts: 183
- Joined: Sun Mar 27, 2011 3:07 pm
- Location: Italy
-
Contact:
Post
by cameyo »
I have found this method:
Code: Select all
(setq lst '(true nil true b a))
(map sym (sort (map string lst)))
;-> (a b nil true true)
cameyo