2.2.3. Sequences as Conventional Interfaces
Exercise 2.39

Reverse in terms of folds

Complete the following definitions of reverse (exercise 2.18) in terms of fold-right and fold-left from exercise 2.38:

(define (reverse sequence)
  (fold-right (lambda (x y) <??>) nil sequence))

(define (reverse sequence)
  (fold-left (lambda (x y) <??>) nil sequence))


There are no comments yet.

Authentication required

You must log in to post a comment.

Login