Equality vs. Matching


; a version of 'equal' analogous to 'match'
(defun equal (pat inp)
  (if (consp pat)
      (and (consp inp)
           (equal (first pat) (first inp))
           (equal (rest pat)  (rest inp)))
      (eql pat inp)))

Contents    Page-10    Prev    Next    Page+10    Index