--- /dev/null
+#lang racket
+
+(define (fold-left op initial coll)
+ (define (iter result rest)
+ (if (null? rest)
+ result
+ (iter (op result (car rest))
+ (cdr rest))))
+ (iter initial coll))
+
+(provide fold-left)
\ No newline at end of file
--- /dev/null
+#lang racket
+
+(require "utils.rkt"
+ "ex2_36.rkt"
+ "ex2_38.rkt")
+
+(define fold-right accumulate)
+
+(define (reverse1 coll)
+ (fold-right (lambda (x y) (append y (list x))) '() coll))
+
+(define (reverse2 coll)
+ (fold-left (lambda (x y) (cons y x)) '() coll))
+