hello, Iām looking for some operation to sub match, Iām not sure if there is one, but if it existed I expected to working something like this:
(def items
{1 {:a "a"
:b "b"}})
(m/find {:id 1}
{:id (m/sub-match (m/app items ?item)
{:a ?a})}
?a)nice! the integrated index solution is neat š
is there an operator or way to do that?
in terms of text, I want to extract some data point, get over a fn (using m/app) and them match again over that result
@wilkerlucio every problem can be solved with a finite number of m/cata
(def items
{1 {:a "a"
:b "b"}})
(m/rewrite {:id 1}
{:id (m/app items ?item)}
(m/cata [:sub-match ?item])
[:sub-match ?x]
[:after-sub-match ?x])
Sometimes, I also shove more information into the data structure in question. In your case, it looks a little like a join.