(define (accumulate op id term a next b)
  (cond ((> a b) id)
        (else (op (term a) (accumulate op id term (next a) next b)))))

(define (1/factorial n)
  (accumulate * 1 (lambda (x) (/ 1 x)) 1 (lambda (x) (+ x 1)) n))

; > (range 4)
; '(0 1 2 3)
(define (range n)
  (accumulate cons '() (lambda (x) (- x 1)) 1 (lambda (x) (+ x 1)) n))

(define (1+ x) (+ x 1))

; > (acronym '(the united states of america))
; 'usa
(define (acronym l)
  (let ((boring-words '(the a an of in and or but)))
    (accumulate word ""
                (lambda (index)
                  (let ((wd (item index l)))
                    (if (member wd boring-words)
                        ""
                        (first wd))))
                1 (lambda (x) (+ x 1)) (length l))))