Closed noprompt closed 3 years ago
(ns scratch (:require [meander.epsilon :as m])) (defn q? [m k] (m/find m (m/or {~k _} {:a {~k _}} {:b {~k _}}) true _ false)) ;; RIGHT (q? {:b :c} :b) ;; => true ;; WRONG (q? {:a {:b :c}} :b) ;; => false ;; WRONG (q? {:b {:c :d}} :c) ;; => false