Unformatted text preview: )) ;; bad codding style - you may forget to either replace 0 to 1, or "has-zero" to "has-one", so it may recurse to different function #|(define (has-one lst) (if (null? lst) false (or (= (first lst) 1) (has-one (rest lst))) )) |# | ; lets write a new function "has", and parametrize it (define (has num lst) (if (null? lst) false (or (= (first lst) num) (has num (rest lst))) )) (define (has-one lst) (has 1 lst))...
View Full Document
This document was uploaded on 02/12/2010.
- Winter '09