CSC 153, Class 6: Lab on Conditionals Overview * Lab * Reflection? Administrivia * No new homework * Long reading on recursion in Scheme * New student (Gone) Observations * Quote is not "make it a symbol". Quote is "take it literally". * Identical symbols seem to occupy the same memory location (at least in DrScheme) * "Identical" lists do not. * Consider (define alpha (lambda (x) x)) (define beta (lambda (x) x)) Should they be equivalent in some sense? (define alpha (lambda (x) (if (odd? x) x (beta x)))) (define beta (lambda (x) (if (odd? x) x (alpha x)))) * Reminder: Predicate names should end with a question mark. * Compare (define grade? (lambda (val) (and (>= val 0) (<= val 100)))) to (define grade? (lambda (val) (<= 0 val 100))) * How did you define the symbol-or-list? procedure? THOUGHT EXPERIMENT Pretend append were not built in to Scheme. How would you write it? (Pseudocode is fine.)