I'll post what I've learned. use this as my notebook. by markchiang (江奕賢)
(define (count lis ele) (cond((null? lis) 0) ((eq? (car lis) ele) (+ 1 (count (cdr lis) ele))) (else (count (cdr lis) ele))) ) ) (count '(a b c d a a) 'a)
沒有留言:
張貼留言