@mac You should be able to try out quoted patterns now.
(require '[meander.epsilon.interpreter :as mi])
((mi/finder '[?x ?y] identity) [1 2]))
;; => {?x 1, ?y 2}
Please report any issues you encounter.
$ cat /tmp/meander.clj
(ns private.tmp.meander)
(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {meander/epsilon {:mvn/version "0.0.588"}}})
(require '[meander.epsilon.interpreter :as mi])
((mi/finder '[?x ?y] identity) [1 2])
$ bb /tmp/meander.clj
Downloading: meander/epsilon/0.0.588/epsilon-0.0.588.pom from clojars
Downloading: meander/epsilon/0.0.588/epsilon-0.0.588.jar from clojars
----- Error --------------------------------------------------------------------
Type: java.lang.Exception
Message: Could not find namespace: meander.epsilon.interpreter.
Location: /tmp/meander.clj:5:1
Ah, the namespace segments should be reversed: meander.interpreter.epsilon
@noprompt on clojure and bb I'm getting:
{:meander.interpreter.epsilon/cata #object[meander.interpreter.epsilon$match_system_factory$fn__3238$f__3241 0x4863c8ac "meander.interpreter.epsilon$match_system_factory$fn__3238$f__3241@4863c8ac"], ?x 1, ?y 2}
@borkdude Yes. I elided that key in the other examples for demonstration purposes and probably should have added a ,,,
or something to denote the presence of “other stuff”.
The cata function is put in the map so that the cata
pattern can work properly.
I could have put it in meta data or something but the cost of calling with-meta
in pretty much every in location where bindings are being manipulated is expensive.
Another thing we can do is dissoc
it, but that’s also extra work that doesn’t technically need to go down.
For find
style stuff, probably not a big deal, and it may not even be a big deal for search
either.
this is fine
I’m a big push over though. If it’s annoying people, I have no problem with blasting it from space.
I'd say dissocing makes sense. It is just going to confuse people and probably not provide any value.