Skip to content

Instantly share code, notes, and snippets.

@jone
Created September 20, 2010 06:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jone/587500 to your computer and use it in GitHub Desktop.
Save jone/587500 to your computer and use it in GitHub Desktop.
(defun jone-filter (condp lst)
(delq nil
(mapcar (lambda (x) (and (funcall condp x) x)) lst)))
(jone-filter (lambda (e) (string= e "hans")) ("hans" "peter"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment