[uim-commit] r650 - trunk/scm
yamaken at freedesktop.org
yamaken at freedesktop.org
Mon Feb 14 21:28:27 PST 2005
Author: yamaken
Date: 2005-02-14 21:28:25 -0800 (Mon, 14 Feb 2005)
New Revision: 650
Modified:
trunk/scm/util.scm
Log:
* scm/util.scm
- (delete): New SRFI procedure
Modified: trunk/scm/util.scm
===================================================================
--- trunk/scm/util.scm 2005-02-14 21:32:13 UTC (rev 649)
+++ trunk/scm/util.scm 2005-02-15 05:28:25 UTC (rev 650)
@@ -426,6 +426,18 @@
(not (pred elm)))
lst)))
+;; TODO: write test
+(define delete
+ (lambda args
+ (let ((x (car args))
+ (lst (cadr args))
+ (val=? (if (null? (cddr args))
+ =
+ (car (cddr args)))))
+ (filter (lambda (elm)
+ (not (val=? elm x)))
+ lst))))
+
(define alist-delete
(lambda args
(let ((key (car args))
More information about the Uim-commit
mailing list