(let [sf (rewriter
'{?k1 ?v1, ?k2 ?v2}
;; or on the right!
'(meander.epsilon/or {?v1 ?k1} {?v2 ?k2}))
;; Makes a system like `meander.epsilon/rewrite`
s_find (sf find-runtime)
;; Makes a system like `meander.epsilon/rewrites`
s_search (sf depth-first-search-runtime)
target {:a 1 :b 2 :c 3}]
[(s_find target)
(s_search target)])
;; => [{1 :a}
;; ({1 :a}
;; {2 :b}
;; {1 :a}
;; {3 :c}
;; {2 :b}
;; {1 :a}
;; {2 :b}
;; {3 :c}
;; {3 :c}
;; {1 :a}
;; {3 :c}
;; {2 :b})]
This is on the epsilon-interpreter
branch (almost there!).
Don’t tell anyone this but you can use and
, or
, and let
on the right. 😉
After this is merged, I think beyond bug fixes, I really need to stop working on the epsilon
arm of the project and continue this work on zeta
.
I think the foundation here is good enough to stand on though. I haven’t tried it yet, but I think this model could be extended to support explainability by rolling a custom runtime.
The only exception might be cata
.
But that may not be the case.