; incr.scm: a simple Scheme program ; to load this file: (load "incr") ; then you can call these two functions from the prompt ; (increment n) returns n + 1 (define increment (lambda (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 (lambda (lst) (cond ((null? lst) ()) (else (cons (increment (car lst)) (increment-list (cdr lst)))) ) ) )