+cl-kmrcl (1.104-1) unstable; urgency=low
+
+ * lists.lisp: Add delete-alist and remove-alist
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Mon, 20 Jun 2011 15:55:57 -0600
+
cl-kmrcl (1.103-1) unstable; urgency=low
- * Remove UTF-8 code to allow compilation on CLISP
+ * Remove UTF-8 code to allow compilation on CLISP
-- Kevin M. Rosenberg <kmr@debian.org> Sun, 05 Sep 2010 22:26:17 -0600
(defmethod perform ((o test-op) (c (eql (find-system 'kmrcl-tests))))
(or (funcall (intern (symbol-name '#:do-tests)
(find-package '#:regression-test)))
- (error "test-op failed")))
+ (error "test-op failed")
+ t))
(:file "os" :depends-on ("macros" "impl"))
(:file "signals" :depends-on ("package"))
(:file "btree" :depends-on ("macros"))
+ (:file "hash" :depends-on ("macros"))
))
(defmethod perform ((o test-op) (c (eql (find-system 'kmrcl))))
(setf (cdr ,elem) ,val))
(,alist
(setf (cdr (last ,alist)) (list (cons ,akey ,val))))
- (t
- (setf ,alist (list (cons ,akey ,val)))))
+ (t
+ (setf ,alist (list (cons ,akey ,val)))))
,alist)))
(defun get-alist (key alist &key (test #'eql))
(update-alist key value alist :test test)
value)
+(defun remove-alist (key alist &key (test #'eql))
+ "Removes a key from an alist."
+ (remove key alist :test test :key #'car))
+
+(defun delete-alist (key alist &key (test #'eql))
+ "Deletes a key from an alist."
+ (delete key alist :test test :key #'car))
+
(defun alist-plist (alist)
(apply #'append (mapcar #'(lambda (x) (list (car x) (cdr x))) alist)))
`(/ (+ ,@args) ,(length args)))
(defmacro with-gensyms (syms &body body)
- `(let ,(mapcar #'(lambda (s) `(,s (gensym)))
+ `(let ,(mapcar #'(lambda (s) `(,s (gensym ,(format nil "~A-" s))))
syms)
,@body))
#:alistp
#:get-alist
#:update-alist
+ #:remove-alist
+ #:delete-alist
#:alist-plist
#:plist-alist
#:update-plist
;; mop.lisp
#:short-arg-cesd
#:short-arg-dsdc
+
+ ;; hash.lisp
+ #:print-hash
))