Documentation
Attempt to match MATCHER against TARGET. MATCHER can be either a
function or a list.
Source
(defun match (matcher target)
"Attempt to match MATCHER against TARGET. MATCHER can be either a
function or a list."
(if (functionp matcher)
(funcall matcher
(make-match-state :target target
:bindings '()
:matched nil)
(lambda (s k q)
(declare (ignore k q))
(return-from match (values t
(matched s)
(bindings s))))
(lambda (s k q)
(declare (ignore s k q))
(return-from match (values nil nil nil))))
(match (make-matcher matcher) target)))
Source Context