original commit: 5fe33a0a2cc83c9172f29a13a4050921efe169e2
This commit is contained in:
Matthew Flatt 1997-08-12 17:47:51 +00:00
parent 3b0857d638
commit 9611ece732

View File

@ -145,7 +145,7 @@
(map cdr l))]))))
(case-lambda
[(f init l) (fold-one f init l)]
[(f init . ls) (fold-n f init ls)]))))
[(f init l . ls) (fold-n f init (cons l ls))]))))
(define foldr
(polymorphic
@ -169,7 +169,7 @@
(fold-n f init (map cdr l))))]))))
(case-lambda
[(f init l) (fold-one f init l)]
[(f init . ls) (fold-n f init ls)]))))
[(f init l . ls) (fold-n f init (cons l ls))]))))
(define first (polymorphic car))
(define second (polymorphic cadr))