Fork me on GitHub
#meander
<
2021-01-03
>
jimmy19:01:22

I’ll throw out another solution just in case anyone is interested.

(m/rewrite db
  {:items [{:id !ids :labels (m/or [!labels ..!n]
                                   (m/let [!n 0]))} ..!m]
   :labels ?labels}
  {:items
   [{:id !ids :labels [(m/cata [!labels ?labels]) ..!n]} ..!m]}

  [?label (m/scan {:id ?label :name ?name})]
  ?name)

👍 3
tothda21:01:04

Thank you!

tothda21:01:31

Would be useful to post this to the original stackoverflow question too.