(defun lookup (x y) (find-if (lambda (fact) (and (eql (car fact) x) (eql (cadr fact) y))) *facts*)) (defun get-prop (x y) (some (lambda (abst) (lookup abst y)) (baz x))) (defun show-props (prop) (let ((concepts (remove-duplicates (mapcar 'car *facts*)))) (dolist (x concepts) (format t "~%~S => ~S" x (get-prop x prop)))))