aboutsummaryrefslogtreecommitdiffstats
path: root/srfi-1.scm
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2007-12-28 16:25:32 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:39 -0800
commitd8ae23691ed6392b7f320f5fa7d4dd78ae52c10e (patch)
treeb20b8bc02e854c4c86d39ee22a0638a8b06e01af /srfi-1.scm
parentedd1ebef3ad774e7cbcc2f5918d555bfb0b44091 (diff)
parent64f037d91e0c9296dcaef9a0ff3eb33b19a2ed34 (diff)
downloadslib-d8ae23691ed6392b7f320f5fa7d4dd78ae52c10e.tar.gz
slib-d8ae23691ed6392b7f320f5fa7d4dd78ae52c10e.zip
Import Debian changes 3a5-1debian/3a5-1
slib (3a5-1) unstable; urgency=low * New upstream release. * slib.texi (Library Catalogs): Repeat change from 3a3-3. * Makefile: Repeat $(htmldir)slib_toc.html changes from 3a2-1. * guile.init: (library-vicinity): Repeat change from 3a4-2. * debian/rules (binary-indep): Don't hide .init files in a separate subdirectory, thus conforming better to the usual slib practice. Put a symlink in place to ease transitions. (Closes: #407370).
Diffstat (limited to 'srfi-1.scm')
-rw-r--r--srfi-1.scm17
1 files changed, 13 insertions, 4 deletions
diff --git a/srfi-1.scm b/srfi-1.scm
index 676cc90..98294b0 100644
--- a/srfi-1.scm
+++ b/srfi-1.scm
@@ -253,8 +253,17 @@
(f l (pair-fold-right f z (cdr l)))))
;;@body
-(define (reduce f ridentity list)
- (if (null? list) ridentity (fold f (car list) (cdr list))))
+(define reduce
+ (let ((comlist-reduce reduce))
+ (lambda args
+ (apply (if (= 2 (length args))
+ comlist-reduce
+ (lambda (f ridentity list)
+ (if (null? list)
+ ridentity
+ (fold f (car list) (cdr list)))))
+ args))))
+
(define (reduce-right f ridentity list)
(if (null? list)
ridentity
@@ -333,11 +342,11 @@
;;@args pred list
(define remove
- (let ((comlist:remove remove))
+ (let ((comlist-remove remove))
(lambda (pred l)
(if (procedure? pred)
(filter (lambda (x) (not (pred x))) l)
- (comlist:remove pred l))))) ; 'remove' has incompatible semantics in comlist of SLIB!
+ (comlist-remove pred l))))) ; 'remove' has incompatible semantics in comlist of SLIB!
;;@args pred list
(define (partition! p? l)