meander

2023-08-07T07:43:43.669529Z

Hello, I'm trying to refresh my meanderian 🙂 I'm trying to capture the ...rest of the kvs in the map (without ?route of course) and then spread it in the return structure:

(m/search preset
            {:content (m/scan [?key _])
             :children {?key {:navigation {:route ?route & (m/cata ?rest)}}}}

            [?route {:name ?key
                     ...?rest}])
What operators am I looking for (instead of the ...)?

noprompt 2023-08-13T18:35:09.077659Z

@lidorcg The right hand side of search rules are Clojure code. So you're looking for

(m/search preset
            {:content (m/scan [?key _])
             :children {?key {:navigation {:route ?route & ?rest}}}}

            [?route (assoc ?rest :name ?key)])

🙏 1
2023-08-13T19:30:00.702279Z

BTW I found the docs in the GitHub repo. They're very good, I'd link to them (or at least the directory) from the main README, so they'd be more obvious to find.

Kirill Chernyshov 2023-08-07T08:31:48.658539Z

should be ..!rest

2023-08-07T09:26:29.754709Z

(m/search preset
            {:content (m/scan [?key _])
             :children {?key {:navigation {:route ?route ..!rest}}}}

            [?route {:name ?key
                     ..!rest}])
is this what you had in mind? it throws, I'm guessing something to do with search