Fork me on GitHub
#specter
<
2020-01-20
>
theeternalpulse19:01:40

Is there a general naming pattern for paths. For example I have this recursive path function

(defn node-finder
  "Generates a recursive-path finder that visits
  matching `pred-fn`"
  [pred-fn]
  (recursive-path
    [] p
    (specter/cond-path
      pred-fn STAY
      map? [MAP-VALS p]
      vector? [ALL p])))
That generates a path that finds a key-value that matches a certain pattern. I'm thinking node-finder should be node-path, should then the result be bound to something like FUNCTION-VALUE or FUNCTION-PATH? I'm guessing the former seems more consistent with the naming of the core paths.

nathanmarz20:01:18

I would call something like that matching-nodes