Implement till 2.62

This commit is contained in:
2020-11-15 11:30:56 -05:00
parent d343170831
commit 3c321654fb
3 changed files with 126 additions and 4 deletions

View File

@@ -100,7 +100,7 @@
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(fold-right op initial (cdr sequence)))))
(display (fold-right / 1 (list 1 2 3))) (newline) ; 3/2
(display (fold-left / 1 (list 1 2 3))) (newline) ; 1/6