; incr.scm: a simple Scheme program ; to load this file: (load "incr") ; them you can call these two functions from the prompt ; (increment n) returns n + 1 (define (increment n) (+ n 1)) ; (increment-list lst) accept a list of numbers and returns a new list ; containing the result of increment each number of lst by 1. (define (increment-list lst) (cond ((null? lst) ()) (else (cons (increment (car lst)) (increment-list (cdr lst)))) ) )