(defun foo (thing) (alexandria:switch (thing :test (lambda (thing list) (member thing list :test #'equal))) ('(1 2 3) :number) ('("1" "2" "3") :string) ('(:one :two :three) :keyword))) Cl-USER> (foo 1) :NUMBER Cl-USER> (foo "2") :STRING Cl-USER> (foo :three) :KEYWORD