axiom-of-association?   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/pattern.xtm

Implementation

(define axiom-of-association? 
  (lambda (expr)
    (let* ((pat (match '(((p? = q?) = r?) = (p? = (q? = r?)))))
           (res (pat expr))
           (pqr (cl:duplicates (flatten (map cdr (if res res '()))))))
      (= (length pqr) 3))))


Back to Index