CS 3304: Comparative Languages
FP Foundations, Scheme
[
Course Documents
] : [
FP Foundations, Scheme
]
Previous
Contents
Next
Keyword Index
Interpretive features
One can define a function that builds Scheme code and requests its interpretation
The interpreter is a user-available function,
EVAL
Suppose we have a list of numbers that must be added together
(define (adder lis) (cond ((null? lis) 0) (else (eval (cons '+ lis))) ) )
The parameter is a list of numbers to be added; adder inserts a + operator and interprets the resulting list