Fork me on GitHub
#meander
<
2021-05-01
>
ribelo00:05:32

I'm working on something like this, I'll definitely post a link to the gh here as soon as I'm finished

ribelo00:05:48

using macros I want to generate meander code that return transducers xD

noprompt02:05:05

This is something I want to. 🙂

ribelo14:05:40

why not write macros that write (macro based) meander code that would generate transducers functions? https://github.com/ribelo/danzig

🤯 3
👍 2
noprompt19:05:19

Cool stuff man. 🙂

ribelo17:05:58

(let [db {:db/id {:ivan  {:name   "Ivan"
                          :friend [:db/id :petr]}
                  :petr  {:name   "Petr"
                          :friend [[:db/id :smith] [:db/id :ivan]]}
                  :smith {:name   "Smith"
                          :friend [:db/id :petr]}}}]

  (m/search db
    {_ {?e {:name "Ivan"
            :friend (m/or (m/scan [?t ?f]) [?t ?f])}
        ?f {:name ?name}}}
    [?t ?f ?name]))
;; => ([:db/id :petr "Petr"] [:db/id :smith "Smith"])
shouldn't the returned result be [:db/id :petr "Petr"]?

🪲 2
noprompt19:05:55

This is a bug. I’ve figured out what is going on and will make a patch.

👍 2