Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun cnt (lst el)
- (if (eq nil lst)
- 0
- (if (eq (car lst) el)
- (+ 1 (cnt (cdr lst) el))
- (cnt (cdr lst) el)
- )
- )
- )
- (print (cnt (list 1 2 1 3 4 1 2 1) 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement