Fork me on GitHub
#meander
<
2020-12-02
>
noprompt19:12:13

(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})]

noprompt19:12:30

This is on the epsilon-interpreter branch (almost there!).

noprompt19:12:19

Don’t tell anyone this but you can use and, or, and let on the right. 😉

noprompt19:12:56

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.

noprompt19:12:20

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.

noprompt19:12:31

The only exception might be cata.

noprompt19:12:46

But that may not be the case.