Quantcast
Channel: Autodesk AutoCAD forums
Viewing all articles
Browse latest Browse all 14319

How to sort an an association list?

$
0
0

Hi,

 

Does anybody knows how can I sort  an association list?

for example:

(setq lst '((1 . "s") (12 . "t") (-7 . "u") (0 . "v")))

 should be sorted as:

((-7 . "u") (0 . "v") (1 . "s") (12 . "t"))

 { sort on: (car(assoc index lst)) value}

 

 

Thanks,


Viewing all articles
Browse latest Browse all 14319

Trending Articles