Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created March 13, 2014 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ambda/9525498 to your computer and use it in GitHub Desktop.
Save 1ambda/9525498 to your computer and use it in GitHub Desktop.
lisp-macro-5
(defparameter *person-db* '((:name "Anster" :age 26 :address "Seoul")))
(defun select (selector-fn)
(remove-if-not selector-fn *person-db*))
(defun where (&key name age address)
#'(lambda (row)
(and
(if name (equal (getf row :name) name) t)
(if age (equal (getf row :age) artist) t)
(if address (equal (getf row :address) address) t))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment