Advertisement
n0g3

minta zh 2. feladat

May 9th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.16 KB | None | 0 0
  1. (defun swap (l p1 p2)
  2. (let ( (s1 (nth (1- p1) l)) (s2 (nth (1- p2) l)))
  3. (setf (nth (1- p1) l) s2) (setf (nth (1- p2) l) s1) l ; this l is the returned value
  4. )
  5. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement