;;; $Id: add1-to-each-mod.scm,v 1.2 2006/01/04 07:05:01 leavens Exp $ ;;; AUTHOR: Brian Dorn and Gary T. Leavens (module add1-to-each-mod (lib "typedscm.ss" "typedscm") (provide add1-to-each) (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))))))) ) ;; end module