specter

2025-04-20T13:10:20.604139Z

is there a way to debug what specter is doing? I'm facing a bug and I'm having trouble following specter navigations...

nathanmarz 2025-04-20T17:10:44.703159Z

@lidorcg you can use something like this to see what's going on:

(defnav SPY-NAV
  []
  (select* [_this structure next-fn]
    (println "SPY" structure)
    (next-fn structure))
  (transform* [_this structure next-fn]
    (println "SPY" structure)
    (next-fn structure)))

2025-04-20T17:15:34.236669Z

I have something like this. Is there a way to understand next-fn? It's going somewhere that baffles me

nathanmarz 2025-04-20T17:16:51.243129Z

next-fn invokes the rest of the path

nathanmarz 2025-04-20T17:17:15.256299Z

so if your path is [:a SPY-NAV ALL MAP-VALS], then next-fn will be [ALL MAP-VALS]

❤️ 1