Skip to content

Instantly share code, notes, and snippets.

@chomado
Forked from anonymous/gist:5546134
Created May 9, 2013 08:11
Show Gist options
  • Save chomado/5546190 to your computer and use it in GitHub Desktop.
Save chomado/5546190 to your computer and use it in GitHub Desktop.
(defun a-ikutu (lst)
(length (filter #'(lambda (x) (eq x 'a)) lst)))
;; filter関数
(defun filter (pred lst)
(cond ((null lst) nil)
((funcall pred (car lst))
(cons (car ls) (filter pred (cdr lst))))
(t (filter pred (cdr lst)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment