OK, bit of scope creep on the above PR to include maps. š
Some hilarious examples.
(let [m {:a 1 :b 2 :c 3 :d 4 :e 5 :f 6 :g 7 :h 8 :i 9}]
(r/find m
{:g 7 :h 8 :i 9
&a {?k (r/pred even?) & '{} :as ?m1}
&b ?m2}
[?k ?m1 ?m2]))
;; =>
[:f {:f 6} {:e 5, :c 3, :b 2, :d 4, :a 1}]
(let [?m1 {:a 1 :b 2}
?m2 {:c 3 :d 4}
?kvs1 [[:e 5] [:f 6]]]
(r/subst {&1 ?m1
&2 ?m2
&3 ?kvs1
&4 [[:g 7] [:h 8] [:i 9]]}))
;; =>
{:a 1 :b 2 :c 3 :d 4 :e 5 :f 6 :g 7 :h 8 :i 9}
So basically symbols with names matching the regex &.*
can be used many times.
I just need to do a bit of post processing to clean up the output for substitution.
So just FYI the new syntax will allow you to write
(a b c & _ l m n & _ x y z)
instead of
(a b c . _ ... l m n . _ ... x y z)
The PR is still open, I havenāt merged anything yet. Iām waiting on review/approval/comments from others (if anyone has them).
I'm still not here, but tomorrow I'll be talking publicly about why meander is awesome
Awesome! Good luck with your talk.
Everyone: Iām also starting to make some updates to the backlog. Currently Iām moving some issues to the discussions section, and closing issues which either canāt be resolved or do not seem like ādiscussion materialā pending an action plan, etc.
OK. I think for the most part thats done.
Probably the most important discussion at the moment will is the one about configuration: https://github.com/noprompt/meander/discussions/179
I urge anyone with opinions/ideas about the matter to chip in.
When I get a chance, I plan on opening a discussion about zeta
.
I will probably mention this in that discussion, but I want to let everyone know that I plan to make zeta
the final version of the library (with me as the maintainer anyway) so I would like to ensure that it is robust enough to adapt and extend.
You've had enough? š