Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun swap (l p1 p2)
- (let ( (s1 (nth (1- p1) l)) (s2 (nth (1- p2) l)))
- (setf (nth (1- p1) l) s2) (setf (nth (1- p2) l) s1) l ; this l is the returned value
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement