I'm lucky enough to find all these list operations easy, as I use
newLISP. On the down side, I have to use 'osascript' to communicate
with Apple applications :-(
I haven't yet needed to convert lists between AppleScript and Lisp
format...
(set 'list1 '(1 2 3 4 5 6))
(set 'list2 '(6 7 8 9 10))
(difference list1 list2)
;-> (1 2 3 4 5)
(difference list2 list1)
;-> (7 8 9 10)
(intersect list2 list1)
;-> (6)
(find 4 list1) ; find index of 4 in list1
;-> 3
(match '(* 4 5 *) list1 true)
;-> ((1 2 3) 4 5 (6))
which are the sort of things I wanted to see in AppleScript...