Comp 210 Lab 3: List template
The template development steps are
- Use a cond expression with the same number of
clauses as the data definition has cases.
Use the appropriate predicates in tests for each case.
(If the data definition has only one case, skip the cond.)
- In each case, show the possible uses of selectors.
- In each case, show the possible uses of natural recursion.
For example, the template for a function on list-of-symbols is
; los-fun: List-of-Symbol --> ??
; A fun(ction) template.
(define (los-fun a-los)
(cond
[(empty? a-los) ...]
[(cons? a-los) ...(first a-los)...(los-fun (rest a-los))...]))