       (path-matches-with-binding-clause? clause) path-matches-with-binding-lens
       (optional-path-matches-without-binding-clause? clause) optional-path-matches-without-binding-lens
       (optional-path-matches-with-binding-clause? clause) optional-path-matches-with-binding-lens
-      (optional-clause? clause) (lens/>> optional-clause-clause ((clause-lens
-                                                                  key-exists-without-binding-lens
-                                                                  key-exists-with-binding-lens
-                                                                  optional-key-exists-without-binding-lens
-                                                                  optional-key-exists-with-binding-lens
-                                                                  path-exists-without-binding-lens
-                                                                  path-exists-with-binding-lens
-                                                                  optional-path-exists-without-binding-lens
-                                                                  optional-path-exists-with-binding-lens
-                                                                  key-matches-without-binding-lens
-                                                                  key-matches-with-binding-lens
-                                                                  optional-key-matches-without-binding-lens
-                                                                  optional-key-matches-with-binding-lens
-                                                                  path-matches-without-binding-lens
-                                                                  path-matches-with-binding-lens
-                                                                  optional-path-matches-without-binding-lens
-                                                                  optional-path-matches-with-binding-lens)
-                                                                 (optional-clause-clause clause)))
       :else
       (c/assertion-violation `clause-lens "not a valid clause" clause))))
 

                      path-matches-without-binding-clause?
                      path-matches-with-binding-clause?
                      optional-path-matches-without-binding-clause?
                      optional-path-matches-with-binding-clause?
                      optional-clause?))

;; helpers
(defn clause-lens

    (conj bindings `[])

    (optional-path-matches-with-binding-clause? clause)
    (conj bindings (optional-path-matches-with-binding-clause->rhs-match message clause))))

(defn pattern->rhs
  [message pattern rhs]
