Hi Chris, myList=sort(myList lambda((a b) cadr(a)<cadr(b))) The lambda creates a temporary (nameless) function with two arguments (the two list items to be compared), and then the body of that function is comparing the 2nd element of each sublist (using the cadr). A word of caution: sort is a destructive function (changes the list in place) so make sure you use the return value of the sort function as otherwise slightly odd things can happen. Regards, Andrew.
↧