specter

Latest version: 1.1.3
theeternalpulse 2020-01-20T19:28:40.002Z

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.

nathanmarz 2020-01-20T20:29:18.002300Z

I would call something like that matching-nodes