fork download
  1. ;;; (yiwwdn) by Zelah
  2.  
  3. (defmacro fn1 (exp) (list 'function (list 'lambda (list 'x) exp)))
  4.  
  5. (defmacro pr (&rest args) (cons 'prnt args))
  6.  
  7. (defmacro prnt (exp &rest j) (list 'progn (list 'terpri) (list 'princ "--------------------") (list 'terpri) (list 'elist (list 'quote exp)) (list 'terpri) (list 'princ "-------result-------") (list 'terpri) (list 'elist exp) (list 'terpri)))
  8.  
  9. (defmacro prn (exp j) (list 'if (list 'funcall (list 'n==== exp) (list 'quote j)) (list 'progn (list 'prnt exp) (list 'princ "------expected------") (list 'terpri) (list 'elist (list 'quote j)) (list 'terpri))))
  10.  
  11. ;;;
  12.  
  13. (defparameter *delimiter* ",")
  14.  
  15. (defparameter *spaces* " ")
  16.  
  17. (defun elist (exp) (if (listp exp) (let ((sp *spaces*)) (princ "(") (princ sp) (loop for e in exp do (funcall #'(lambda (x) (progn (write x) (princ sp) (princ *delimiter*) (princ sp))) e)) (princ ")")) (write exp)))
  18.  
  19. ;;;
  20.  
  21. (terpri)
  22.  
  23. ;;;
  24.  
  25. (defun odd (fn) (fn1 (if x (funcall fn x))))
  26.  
  27. (defun pred (fn) (fn1 (if (funcall fn x) (or x t))))
  28.  
  29. (defun less (y) (fn1 (if (< x y) x)))
  30.  
  31. (defun more (y) (fn1 (if (> x y) x)))
  32.  
  33. (defun == (y) (fn1 (if (eq x y) x)))
  34.  
  35. (defun === (y) (fn1 (if (eql x y) x)))
  36.  
  37. (defun ==== (y) (fn1 (if (equal x y) x)))
  38.  
  39. (defun y= (y) (fn1 (if (= x y) x)))
  40.  
  41. (defun n= (y) (fn1 (if (not (= x y)) x)))
  42.  
  43. (defun n== (y) (fn1 (if (not (eq x y)) x)))
  44.  
  45. (defun n=== (y) (fn1 (if (not (eql x y)) x)))
  46.  
  47. (defun n==== (y) (fn1 (if (not (equal x y)) x)))
  48.  
  49. (defun make-adder (n) (fn1 (if (numberp x) (+ x n))))
  50.  
  51. ;;;
  52.  
  53. (defun predor (pred &rest preds) (labels ((predor (xs preds) (if preds (or (apply (car preds) xs) (predor xs (cdr preds))) ()))) (lambda (x &rest s) (let ((xs (cons x s))) (or (apply pred xs) (predor xs preds))))))
  54.  
  55. (defun predand (pred &rest preds) (labels ((predand (xs preds) (if preds (and (apply (car preds) xs) (predand xs (cdr preds))) (or (car xs) t)))) #'(lambda (x &rest s) (let ((xs (cons x s))) (if (apply pred xs) (predand xs preds))))))
  56.  
  57. (defun predfn (fn &rest preds) #'(lambda (x &rest s) (let ((xs (cons x s))) (if (apply (apply #'predand preds) xs) (apply fn xs)))))
  58.  
  59. (defun fnfn (fn &rest fnfn) (labels ((fnfn (x fnfn) (if fnfn (fnfn (funcall (car fnfn) x) (cdr fnfn)) x))) #'(lambda (x &rest s) (fnfn (apply fn (cons x s)) fnfn))))
  60.  
  61. (defun shorter (x y) (labels ((len (x) (if (numberp x) x (length x)))(compare (x y) (and (consp y) (or (not x) (compare (cdr y) (cdr x)))))) (values (if (if (if (listp x) (listp y)) (compare x y) (< (len x) (len y))) (or x t)) y x)))
  62.  
  63. (defun typefn (fn &rest preds)
  64. (fn1 (or (funcall (predfn fn (apply #'predand preds)) x) x)))
  65.  
  66. (defun mapped (fn) (lambda (x &rest s) (if s (mapcar fn (cons x s)) (funcall fn x))))
  67.  
  68. (defun tree-mapped (fn) (labels ((tree-map (x &rest s) (if s (mapcar #'tree-map (cons x s)) (if (consp x) (mapcar #'tree-map x) (funcall fn x))))) #'(lambda (x &rest s) (apply #'tree-map (cons x s)))))
  69.  
  70. (defun 2x () "never used")
  71.  
  72. (setf (symbol-function '2x) (fn1 (* 2 x)))
  73.  
  74. (setf (symbol-function '2x) (typefn #'2x #'numberp))
  75.  
  76. (setf (symbol-function '2x) (tree-mapped #'2x))
  77.  
  78. (defun find-if-values (fn lst) (if lst (if (funcall fn (car lst)) (values (car lst) lst) (find-if-values fn (cdr lst)))))
  79.  
  80. ;;;
  81.  
  82. ;;;
  83.  
  84. (defun last1 (lst) (car (last lst)))
  85.  
  86. (setf (symbol-function 'last1) (mapped #'last1))
  87.  
  88. (defun single (lst) (and (consp lst) (not (cdr lst)) lst))
  89.  
  90. (setf (symbol-function 'single) (mapped #'single))
  91.  
  92. (defun append1 (lst obj) (append lst (list obj)))
  93.  
  94. (defun conc1 (lst obj) (nconc lst (list obj)))
  95.  
  96. (defun mklist (obj) (if (listp obj) obj (list obj)))
  97.  
  98. (setf (symbol-function 'mklist) (mapped #'mklist))
  99.  
  100. (defun longer (x y) (labels ((len (x) (if (numberp x) x (length x)))(compare (x y) (and (consp x) (or (not y) (compare (cdr x) (cdr y)))))) (values (if (if (if (listp x) (listp y)) (compare x y) (> (len x) (len y))) x) y x)))
  101.  
  102. (defun filter (fn lst) (labels ((fi (fn lst acc) (if lst (let ((val (funcall fn (car lst)))) (if val (fi fn (cdr lst) (cons val acc)) (fi fn (cdr lst) acc))) (reverse acc)))) (fi fn lst ())))
  103.  
  104. (defun group (source n) (labels ((rec (source acc) (let ((rest (nthcdr n source))) (if (consp rest) (rec rest (cons (subseq source 0 n) acc)) (reverse (cons source acc)))))) (if (= 0 n) (error "zero length")) (if source (rec source ()))))
  105.  
  106. (defun flatten (x) (labels ((rec (x acc) (if x (if (atom x) (cons x acc) (rec (car x) (rec (cdr x) acc))) acc))) (rec x ())))
  107.  
  108. (setf (symbol-function 'flatten) (mapped #'flatten))
  109.  
  110. (defun prune (test tree) (labels ((rec (tree acc) (if tree (if (consp (car tree)) (rec (cdr tree) (cons (rec (car tree) ()) acc)) (rec (cdr tree) (if (funcall test (car tree)) acc (cons (car tree) acc)))) (reverse acc)))) (rec tree ())))
  111.  
  112. (defun find2 (fn lst) (if lst (let ((val (funcall fn (car lst)))) (if val (values (car lst) val) (find2 fn (cdr lst)))) lst))
  113.  
  114. (defun before (x y lst &key (test #'==)) (if lst (let ((first (car lst))) (if (funcall (funcall test y) first) () (if (funcall (funcall test x) first) lst (before x y (cdr lst) :test test))))))
  115.  
  116. ;;;
  117. ;;;
  118. ;;;
  119. ;;;
  120. ;;;
  121. ;;;
  122. ;;;
  123. ;;;
  124. ;;;
  125. ;;;
  126. ;;;
  127. ;;;
  128. ;;;
  129. ;;;
  130. ;;;
  131. ;;;
  132. ;;;
  133. ;;;
  134. ;;;
  135. ;;;
  136. ;;;
  137. ;;;
  138. ;;;
  139. ;;;
  140. ;;;
  141. ;;;
  142. ;;;
  143.  
  144. (defparameter nine '(
  145. -4 -3 -2 -1 0 1 2 3 4
  146. ))
  147.  
  148. (defparameter het '(
  149. t () 1 "two"
  150. ))
  151.  
  152. (defparameter love '(
  153. (i) (think i) (love) (you)
  154. ))
  155.  
  156. (defparameter tree '(
  157. ((() 2) (3 4) (5 6)) ((7 8) (9 8) (7 6)) ((5 4) (3 2) ((i) (think i))) (((love) (you)) (t ()) (1 "two")) ((-4 -3) (-2 -1) (0 1)) ((2 3) (4))
  158. ))
  159.  
  160. (defparameter e '(
  161. 2 1 4 3 3 4 1 2 2 7 5 1 2 1 2 3
  162. ))
  163.  
  164. (pr nine
  165. (
  166. -4 -3 -2 -1 0 1 2 3 4
  167. ))
  168.  
  169. (pr het
  170. (
  171. t () 1 "two"
  172. ))
  173.  
  174. (pr love
  175. (
  176. (i) (think i) (love) (you)
  177. ))
  178.  
  179. (pr tree
  180. (
  181. ((() 2) (3 4) (5 6)) ((7 8) (9 8) (7 6)) ((5 4) (3 2) ((i) (think i))) (((love) (you)) (t ()) (1 "two")) ((-4 -3) (-2 -1) (0 1)) ((2 3) (4))
  182. ))
  183.  
  184. (pr e
  185. (
  186. 2 1 4 3 3 4 1 2 2 7 5 1 2 1 2 3
  187. ))
  188.  
  189. (pr 42
  190. 42
  191. )
  192.  
  193. (pr (list 42)
  194. (
  195. 42
  196. ))
  197.  
  198. (pr (list (list 42))
  199. (
  200. (42)
  201. ))
  202.  
  203. (pr (2x 2)
  204. 4
  205. )
  206.  
  207. (pr (2x 1 2 3 4)
  208. (
  209. 2 4 6 8
  210. ))
  211.  
  212. (pr (conc1 (list 1 2) 3)
  213. (
  214. 1 2 3
  215. ))
  216.  
  217. (pr nine
  218. (
  219. -4 -3 -2 -1 0 1 2 3 4
  220. ))
  221.  
  222. (pr (mapcar #'2x nine)
  223. (
  224. -8 -6 -4 -2 0 2 4 6 8
  225. ))
  226.  
  227. (pr (apply #'2x nine)
  228. (
  229. -8 -6 -4 -2 0 2 4 6 8
  230. ))
  231.  
  232. (pr (mapcar #'oddp nine)
  233. (
  234. () t () t () t () t ()
  235. ))
  236.  
  237. (pr (mapcar (less 0) nine)
  238. (
  239. -4 -3 -2 -1 () () () () ()
  240. ))
  241.  
  242. (pr (mapcar (more 0) nine)
  243. (
  244. () () () () () 1 2 3 4
  245. ))
  246.  
  247. (pr (mapcar (y= 0) nine)
  248. (
  249. () () () () 0 () () () ()
  250. ))
  251.  
  252. (pr (mapcar (n= 0) nine)
  253. (
  254. -4 -3 -2 -1 () 1 2 3 4
  255. ))
  256.  
  257. (pr (mapcar (make-adder 10) nine)
  258. (
  259. 6 7 8 9 10 11 12 13 14
  260. ))
  261.  
  262. (pr (mapcar (make-adder -10) nine)
  263. (
  264. -14 -13 -12 -11 -10 -9 -8 -7 -6
  265. ))
  266.  
  267. (pr (mapcar (predor (predand (less 0) #'oddp) (predand (more 0) #'evenp)) nine)
  268. (
  269. () -3 () -1 () () 2 () 4
  270. ))
  271.  
  272. (pr (mapcar (predfn (fnfn #'2x (make-adder 10) #'-) (predor (more 2) (less -1)) #'oddp) nine)
  273. (
  274. () -4 () () () () () -16 ()
  275. ))
  276.  
  277. (pr (nthcdr 5 nine)
  278. (
  279. 1 2 3 4
  280. ))
  281.  
  282. (pr (subseq nine 5 8)
  283. (
  284. 1 2 3
  285. ))
  286.  
  287. (pr (last1 nine)
  288. 4
  289. )
  290.  
  291. (pr (filter (predfn (fnfn #'car (make-adder -4)) #'single) (group nine 2))
  292. (
  293. 0
  294. ))
  295.  
  296. (pr (multiple-value-bind (itm prd) (find2 #'oddp nine) (list itm prd))
  297. (
  298. -3 t
  299. ))
  300.  
  301. (pr (multiple-value-bind (itm prd) (find2 (more 4) nine) (list itm prd))
  302. (
  303. () ()
  304. ))
  305.  
  306. (pr het
  307. (
  308. t () 1 "two"
  309. ))
  310.  
  311. (pr (find-if-values #'not het)
  312. ()
  313. )
  314.  
  315. (pr (multiple-value-bind (itm lst) (find-if-values #'not het) lst)
  316. (
  317. () 1 "two"
  318. ))
  319.  
  320. (pr (mapcar #'mklist het)
  321. (
  322. (t) () (1) ("two")
  323. ))
  324.  
  325. (pr (longer het "hat")
  326. (
  327. t () 1 "two"
  328. ))
  329.  
  330. (pr (multiple-value-bind (a b c) (shorter () het) (list a b c))
  331. (
  332. t (t () 1 "two") ()
  333. ))
  334.  
  335. (pr (longer het 3)
  336. (
  337. t () 1 "two"
  338. ))
  339.  
  340. (pr love
  341. (
  342. (i) (think i) (love) (you)
  343. ))
  344.  
  345. (pr (apply #'append (mapcar #'single love))
  346. (
  347. i love you
  348. ))
  349.  
  350. (pr (append1 love '!)
  351. (
  352. (i) (think i) (love) (you) !
  353. ))
  354.  
  355. (pr tree
  356. (
  357. ((() 2) (3 4) (5 6)) ((7 8) (9 8) (7 6)) ((5 4) (3 2) ((i) (think i))) (((love) (you)) (t ()) (1 "two")) ((-4 -3) (-2 -1) (0 1)) ((2 3) (4))
  358. ))
  359.  
  360. (pr (flatten tree)
  361. (
  362. 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 i think i love you t 1 "two" -4 -3 -2 -1 0 1 2 3 4
  363. ))
  364.  
  365. (pr (prune (predand #'numberp #'oddp) tree)
  366. (
  367. ((() 2) (4) (6)) ((8) (8) (6)) ((4) (2) ((i) (think i))) (((love) (you)) (t ()) ("two")) ((-4) (-2) (0)) ((2) (4))
  368. ))
  369.  
  370. (pr (2x tree)
  371. (
  372. ((() 4) (6 8) (10 12)) ((14 16) (18 16) (14 12)) ((10 8) (6 4) ((i) (think i))) (((love) (you)) (t ()) (2 "two")) ((-8 -6) (-4 -2) (0 2)) ((4 6) (8))
  373. ))
  374.  
  375. (pr (2x (funcall (tree-mapped (typefn #'list #'numberp (less 0))) (apply #'flatten tree)))
  376. (
  377. (4 6 8 10 12) (14 16 18 16 14 12) (10 8 6 4 i think i) (love you t 2 "two") ((-8) (-6) (-4) (-2) 0 2) (4 6 8)
  378. ))
  379.  
  380. (pr e
  381. (
  382. 2 1 4 3 3 4 1 2 2 7 5 1 2 1 2 3
  383. ))
  384.  
  385. (pr (before 5 4 e :test #'y=)
  386. ()
  387. )
  388.  
  389. (pr (before 4 5 e :test #'y=)
  390. (
  391. 4 3 3 4 1 2 2 7 5 1 2 1 2 3
  392. ))
  393.  
  394. (pr (before 3 7 e :test #'more)
  395. (
  396. 4 3 3 4 1 2 2 7 5 1 2 1 2 3
  397. ))
  398.  
  399. (pr (list het nine)
  400. (
  401. (t () 1 "two") (-4 -3 -2 -1 0 1 2 3 4)
  402. ))
  403.  
  404. (pr (longer het nine)
  405. ()
  406. )
  407.  
  408. (pr (multiple-value-bind (a b c) (longer het nine) (list a b c))
  409. (
  410. () (-4 -3 -2 -1 0 1 2 3 4) (t () 1 "two")
  411. ))
  412.  
  413. (pr (multiple-value-bind (a b c) (longer nine het) (list a b c))
  414. (
  415. (-4 -3 -2 -1 0 1 2 3 4) (t () 1 "two") (-4 -3 -2 -1 0 1 2 3 4)
  416. ))
  417.  
  418. (pr (multiple-value-bind (a b c) (shorter het nine) (list a b c))
  419. (
  420. (t () 1 "two") (-4 -3 -2 -1 0 1 2 3 4) (t () 1 "two")
  421. ))
  422.  
  423. (pr (multiple-value-bind (a b c) (shorter nine het) (list a b c))
  424. (
  425. () (t () 1 "two") (-4 -3 -2 -1 0 1 2 3 4)
  426. ))
  427.  
  428. (pr (last1 het nine)
  429. (
  430. "two" 4
  431. ))
  432.  
  433. ;;;;;;;;;pay attention;;;;
  434.  
  435. ;;;;;;;;;pay attention;;;;
  436.  
  437. ;;;
  438.  
  439. ;;;
  440.  
  441. (terpri) (terpri)
Success #stdin #stdout #stderr 0.03s 10356KB
stdin
Standard input is empty
stdout

--------------------
NINE
-------result-------
( -4 , -3 , -2 , -1 , 0 , 1 , 2 , 3 , 4 , )

--------------------
HET
-------result-------
( T , NIL , 1 , "two" , )

--------------------
LOVE
-------result-------
( (I) , (THINK I) , (LOVE) , (YOU) , )

--------------------
TREE
-------result-------
( ((NIL 2) (3 4) (5 6)) , ((7 8) (9 8) (7 6)) , ((5 4) (3 2) ((I) (THINK I))) , (((LOVE) (YOU)) (T NIL) (1 "two")) , ((-4 -3) (-2 -1) (0 1)) , ((2 3) (4)) , )

--------------------
E
-------result-------
( 2 , 1 , 4 , 3 , 3 , 4 , 1 , 2 , 2 , 7 , 5 , 1 , 2 , 1 , 2 , 3 , )

--------------------
42
-------result-------
42

--------------------
( LIST , 42 , )
-------result-------
( 42 , )

--------------------
( LIST , (LIST 42) , )
-------result-------
( (42) , )

--------------------
( |2X| , 2 , )
-------result-------
4

--------------------
( |2X| , 1 , 2 , 3 , 4 , )
-------result-------
( 2 , 4 , 6 , 8 , )

--------------------
( CONC1 , (LIST 1 2) , 3 , )
-------result-------
( 1 , 2 , 3 , )

--------------------
NINE
-------result-------
( -4 , -3 , -2 , -1 , 0 , 1 , 2 , 3 , 4 , )

--------------------
( MAPCAR , #'|2X| , NINE , )
-------result-------
( -8 , -6 , -4 , -2 , 0 , 2 , 4 , 6 , 8 , )

--------------------
( APPLY , #'|2X| , NINE , )
-------result-------
( -8 , -6 , -4 , -2 , 0 , 2 , 4 , 6 , 8 , )

--------------------
( MAPCAR , #'ODDP , NINE , )
-------result-------
( NIL , T , NIL , T , NIL , T , NIL , T , NIL , )

--------------------
( MAPCAR , (LESS 0) , NINE , )
-------result-------
( -4 , -3 , -2 , -1 , NIL , NIL , NIL , NIL , NIL , )

--------------------
( MAPCAR , (MORE 0) , NINE , )
-------result-------
( NIL , NIL , NIL , NIL , NIL , 1 , 2 , 3 , 4 , )

--------------------
( MAPCAR , (Y= 0) , NINE , )
-------result-------
( NIL , NIL , NIL , NIL , 0 , NIL , NIL , NIL , NIL , )

--------------------
( MAPCAR , (N= 0) , NINE , )
-------result-------
( -4 , -3 , -2 , -1 , NIL , 1 , 2 , 3 , 4 , )

--------------------
( MAPCAR , (MAKE-ADDER 10) , NINE , )
-------result-------
( 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , )

--------------------
( MAPCAR , (MAKE-ADDER -10) , NINE , )
-------result-------
( -14 , -13 , -12 , -11 , -10 , -9 , -8 , -7 , -6 , )

--------------------
( MAPCAR , (PREDOR (PREDAND (LESS 0) #'ODDP) (PREDAND (MORE 0) #'EVENP)) , NINE , )
-------result-------
( NIL , -3 , NIL , -1 , NIL , NIL , 2 , NIL , 4 , )

--------------------
( MAPCAR , (PREDFN (FNFN #'|2X| (MAKE-ADDER 10) #'-) (PREDOR (MORE 2) (LESS -1)) #'ODDP) , NINE , )
-------result-------
( NIL , -4 , NIL , NIL , NIL , NIL , NIL , -16 , NIL , )

--------------------
( NTHCDR , 5 , NINE , )
-------result-------
( 1 , 2 , 3 , 4 , )

--------------------
( SUBSEQ , NINE , 5 , 8 , )
-------result-------
( 1 , 2 , 3 , )

--------------------
( LAST1 , NINE , )
-------result-------
4

--------------------
( FILTER , (PREDFN (FNFN #'CAR (MAKE-ADDER -4)) #'SINGLE) , (GROUP NINE 2) , )
-------result-------
( 0 , )

--------------------
( MULTIPLE-VALUE-BIND , (ITM PRD) , (FIND2 #'ODDP NINE) , (LIST ITM PRD) , )
-------result-------
( -3 , T , )

--------------------
( MULTIPLE-VALUE-BIND , (ITM PRD) , (FIND2 (MORE 4) NINE) , (LIST ITM PRD) , )
-------result-------
( NIL , NIL , )

--------------------
HET
-------result-------
( T , NIL , 1 , "two" , )

--------------------
( FIND-IF-VALUES , #'NOT , HET , )
-------result-------
( )

--------------------
( MULTIPLE-VALUE-BIND , (ITM LST) , (FIND-IF-VALUES #'NOT HET) , LST , )
-------result-------
( NIL , 1 , "two" , )

--------------------
( MAPCAR , #'MKLIST , HET , )
-------result-------
( (T) , NIL , (1) , ("two") , )

--------------------
( LONGER , HET , "hat" , )
-------result-------
( T , NIL , 1 , "two" , )

--------------------
( MULTIPLE-VALUE-BIND , (A B C) , (SHORTER NIL HET) , (LIST A B C) , )
-------result-------
( T , (T NIL 1 "two") , NIL , )

--------------------
( LONGER , HET , 3 , )
-------result-------
( T , NIL , 1 , "two" , )

--------------------
LOVE
-------result-------
( (I) , (THINK I) , (LOVE) , (YOU) , )

--------------------
( APPLY , #'APPEND , (MAPCAR #'SINGLE LOVE) , )
-------result-------
( I , LOVE , YOU , )

--------------------
( APPEND1 , LOVE , '! , )
-------result-------
( (I) , (THINK I) , (LOVE) , (YOU) , ! , )

--------------------
TREE
-------result-------
( ((NIL 2) (3 4) (5 6)) , ((7 8) (9 8) (7 6)) , ((5 4) (3 2) ((I) (THINK I))) , (((LOVE) (YOU)) (T NIL) (1 "two")) , ((-4 -3) (-2 -1) (0 1)) , ((2 3) (4)) , )

--------------------
( FLATTEN , TREE , )
-------result-------
( 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , I , THINK , I , LOVE , YOU , T , 1 , "two" , -4 , -3 , -2 , -1 , 0 , 1 , 2 , 3 , 4 , )

--------------------
( PRUNE , (PREDAND #'NUMBERP #'ODDP) , TREE , )
-------result-------
( ((NIL 2) (4) (6)) , ((8) (8) (6)) , ((4) (2) ((I) (THINK I))) , (((LOVE) (YOU)) (T NIL) ("two")) , ((-4) (-2) (0)) , ((2) (4)) , )

--------------------
( |2X| , TREE , )
-------result-------
( ((NIL 4) (6 8) (10 12)) , ((14 16) (18 16) (14 12)) , ((10 8) (6 4) ((I) (THINK I))) , (((LOVE) (YOU)) (T NIL) (2 "two")) , ((-8 -6) (-4 -2) (0 2)) , ((4 6) (8)) , )

--------------------
( |2X| , 
(FUNCALL (TREE-MAPPED (TYPEFN #'LIST #'NUMBERP (LESS 0)))
 (APPLY #'FLATTEN TREE)) , )
-------result-------
( (4 6 8 10 12) , (14 16 18 16 14 12) , (10 8 6 4 I THINK I) , (LOVE YOU T 2 "two") , ((-8) (-6) (-4) (-2) 0 2) , (4 6 8) , )

--------------------
E
-------result-------
( 2 , 1 , 4 , 3 , 3 , 4 , 1 , 2 , 2 , 7 , 5 , 1 , 2 , 1 , 2 , 3 , )

--------------------
( BEFORE , 5 , 4 , E , :TEST , #'Y= , )
-------result-------
( )

--------------------
( BEFORE , 4 , 5 , E , :TEST , #'Y= , )
-------result-------
( 4 , 3 , 3 , 4 , 1 , 2 , 2 , 7 , 5 , 1 , 2 , 1 , 2 , 3 , )

--------------------
( BEFORE , 3 , 7 , E , :TEST , #'MORE , )
-------result-------
( 4 , 3 , 3 , 4 , 1 , 2 , 2 , 7 , 5 , 1 , 2 , 1 , 2 , 3 , )

--------------------
( LIST , HET , NINE , )
-------result-------
( (T NIL 1 "two") , (-4 -3 -2 -1 0 1 2 3 4) , )

--------------------
( LONGER , HET , NINE , )
-------result-------
( )

--------------------
( MULTIPLE-VALUE-BIND , (A B C) , (LONGER HET NINE) , (LIST A B C) , )
-------result-------
( NIL , (-4 -3 -2 -1 0 1 2 3 4) , (T NIL 1 "two") , )

--------------------
( MULTIPLE-VALUE-BIND , (A B C) , (LONGER NINE HET) , (LIST A B C) , )
-------result-------
( (-4 -3 -2 -1 0 1 2 3 4) , (T NIL 1 "two") , (-4 -3 -2 -1 0 1 2 3 4) , )

--------------------
( MULTIPLE-VALUE-BIND , (A B C) , (SHORTER HET NINE) , (LIST A B C) , )
-------result-------
( (T NIL 1 "two") , (-4 -3 -2 -1 0 1 2 3 4) , (T NIL 1 "two") , )

--------------------
( MULTIPLE-VALUE-BIND , (A B C) , (SHORTER NINE HET) , (LIST A B C) , )
-------result-------
( NIL , (T NIL 1 "two") , (-4 -3 -2 -1 0 1 2 3 4) , )

--------------------
( LAST1 , HET , NINE , )
-------result-------
( "two" , 4 , )


stderr
Warning: reserving address range 0x80000c0000...0x1fffffffffff that contains memory mappings. clisp might crash later!
Memory dump:
  0x8000000000 - 0x80000bffff
  0x147749200000 - 0x1477494e4fff
  0x147749615000 - 0x147749639fff
  0x14774963a000 - 0x1477497acfff
  0x1477497ad000 - 0x1477497f5fff
  0x1477497f6000 - 0x1477497f8fff
  0x1477497f9000 - 0x1477497fbfff
  0x1477497fc000 - 0x1477497fffff
  0x147749800000 - 0x147749802fff
  0x147749803000 - 0x147749a01fff
  0x147749a02000 - 0x147749a02fff
  0x147749a03000 - 0x147749a03fff
  0x147749a80000 - 0x147749a8ffff
  0x147749a90000 - 0x147749ac3fff
  0x147749ac4000 - 0x147749bfafff
  0x147749bfb000 - 0x147749bfbfff
  0x147749bfc000 - 0x147749bfefff
  0x147749bff000 - 0x147749bfffff
  0x147749c00000 - 0x147749c03fff
  0x147749c04000 - 0x147749e03fff
  0x147749e04000 - 0x147749e04fff
  0x147749e05000 - 0x147749e05fff
  0x147749edc000 - 0x147749edffff
  0x147749ee0000 - 0x147749ee0fff
  0x147749ee1000 - 0x147749ee2fff
  0x147749ee3000 - 0x147749ee3fff
  0x147749ee4000 - 0x147749ee4fff
  0x147749ee5000 - 0x147749ee5fff
  0x147749ee6000 - 0x147749ef3fff
  0x147749ef4000 - 0x147749f01fff
  0x147749f02000 - 0x147749f0efff
  0x147749f0f000 - 0x147749f12fff
  0x147749f13000 - 0x147749f13fff
  0x147749f14000 - 0x147749f14fff
  0x147749f15000 - 0x147749f1afff
  0x147749f1b000 - 0x147749f1cfff
  0x147749f1d000 - 0x147749f1dfff
  0x147749f1e000 - 0x147749f1efff
  0x147749f1f000 - 0x147749f1ffff
  0x147749f20000 - 0x147749f4dfff
  0x147749f4e000 - 0x147749f5cfff
  0x147749f5d000 - 0x14774a002fff
  0x14774a003000 - 0x14774a099fff
  0x14774a09a000 - 0x14774a09afff
  0x14774a09b000 - 0x14774a09bfff
  0x14774a09c000 - 0x14774a0affff
  0x14774a0b0000 - 0x14774a0d7fff
  0x14774a0d8000 - 0x14774a0e1fff
  0x14774a0e2000 - 0x14774a0e3fff
  0x14774a0e4000 - 0x14774a0e9fff
  0x14774a0ea000 - 0x14774a0ecfff
  0x14774a0ef000 - 0x14774a0effff
  0x14774a0f0000 - 0x14774a0f0fff
  0x14774a0f1000 - 0x14774a0f1fff
  0x14774a0f2000 - 0x14774a0f2fff
  0x14774a0f3000 - 0x14774a0f3fff
  0x14774a0f4000 - 0x14774a0fafff
  0x14774a0fb000 - 0x14774a0fdfff
  0x14774a0fe000 - 0x14774a0fefff
  0x14774a0ff000 - 0x14774a11ffff
  0x14774a120000 - 0x14774a127fff
  0x14774a128000 - 0x14774a128fff
  0x14774a129000 - 0x14774a129fff
  0x14774a12a000 - 0x14774a12afff
  0x563780a1e000 - 0x563780b0efff
  0x563780b0f000 - 0x563780c18fff
  0x563780c19000 - 0x563780c78fff
  0x563780c7a000 - 0x563780ca8fff
  0x563780ca9000 - 0x563780cd9fff
  0x563780cda000 - 0x563780cddfff
  0x563781d72000 - 0x563781d92fff
  0x7ffe4509e000 - 0x7ffe450befff
  0x7ffe45148000 - 0x7ffe4514bfff
  0x7ffe4514c000 - 0x7ffe4514dfff