projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba6c088
)
multivariadic append
author
David Vazquez
<davazp@gmail.com>
Sat, 22 Dec 2012 19:54:38 +0000
(19:54 +0000)
committer
David Vazquez
<davazp@gmail.com>
Sat, 22 Dec 2012 19:54:38 +0000
(19:54 +0000)
test.lisp
patch
|
blob
|
history
diff --git
a/test.lisp
b/test.lisp
index
2333621
..
173b814
100644
(file)
--- a/
test.lisp
+++ b/
test.lisp
@@
-94,12
+94,15
@@
x
(list x)))
-(defun append (list1 list2)
+(defun append-two (list1 list2)
(if (null list1)
list2
(cons (car list1)
(append (cdr list1) list2))))
+(defun append (&rest lists)
+ (!reduce #'append-two lists '()))
+
(defun reverse-aux (list acc)
(if (null list)
acc