Created
May 19, 2014 20:08
-
-
Save fuadsaud/2d0cc325f7903a31497e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define funcaozao (s l) | |
(cond | |
(empty? l) 0 | |
(list? (car l)) (+ (count s (car l)) (funcaozao s (cdr l))) | |
else (+ 1 (funcaozao s (cdr l))))) | |
(define count (s l) | |
(cond | |
(empty? l) 0 | |
(= (car l) s) (+ 1 (count (cdr l))) | |
else (count (cdr l)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment