projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix recursive conditional
[jscl.git]
/
src
/
list.lisp
diff --git
a/src/list.lisp
b/src/list.lisp
index
0bd4846
..
7a4ca6d
100644
(file)
--- a/
src/list.lisp
+++ b/
src/list.lisp
@@
-265,6
+265,11
@@
(rplacd 2nd 3rd)))
(rplacd 2nd 3rd)))
+(defun adjoin (item list &key (test #'eql) (key #'identity))
+ (if (member item list :key key :test test)
+ list
+ (cons item list)))
+
(defun intersection (list1 list2 &key (test #'eql) (key #'identity))
(let ((new-list ()))
(dolist (x list1)
(defun intersection (list1 list2 &key (test #'eql) (key #'identity))
(let ((new-list ()))
(dolist (x list1)