;;; $Id: add1-to-each.scm,v 1.1 2004/01/29 00:21:08 leavens Exp $ ;;; AUTHOR: Brian Dorn and Gary T. Leavens (deftype add1-to-each (-> ((list-of number)) (list-of number))) (define add1-to-each (lambda (l) ;; ENSURES: Result is a new list where the value of each element ;; in the original is incremented by one (cond ((null? l) '()) (else (cons (+ 1 (car l)) (add1-to-each (cdr l)))))))