Skip to content

Instantly share code, notes, and snippets.

@fuadsaud
Created May 19, 2014 20:08
Show Gist options
  • Save fuadsaud/2d0cc325f7903a31497e to your computer and use it in GitHub Desktop.
Save fuadsaud/2d0cc325f7903a31497e to your computer and use it in GitHub Desktop.
(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