Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun make-comparison-expr (field value)
- `(equal (getf cd ,field) ,value))
- (defun make-comparisons-list (fields)
- (loop while fields
- collecting (make-comparison-expr (pop fields) (pop fields))))
- (defmacro where (&rest clauses)
- `#'(lambda (cd) (and ,@(make-comparisons-list clauses))))
Add Comment
Please, Sign In to add comment