CS 227 meeting -*- Outline -*- * recursive-moment Instead it might be better to do section 4.2 in the book here... and not assign remove-2nd or something like that until after a lecture like this. Pass out: recursive-moment-handout.txt ** remove-2nd no procedure changes any list you relate one to another (picture 1) the recursive picture (picture 2) is the key to answering the question of how to combine the recursive call and the one step to solve the problem. how to know what to write for answer-2? There are at least two candidates: 1. (remove-2nd 'cat (cdr ls)) ; the default 2. (cdr answer-1) but here alternative 1 doesn't work (picture after 3) when writing function, need to have a cond or if that distinguishes the cases. ** last-adj-out (remove-last) (reverse (remove-1st item (reverse ls))) think of this by symmetry, but it's a bit of magic. The solution given follows the same process. How to distinguish the cases? This is another main point. Want to put them in a cond, so want a helping procedure that returns a boolean. Use examples to show really need a helping procedure. Show dead-end of occurs-in-cdr as helper