specter

nathanmarz 2023-05-22T04:38:12.773889Z

set the channel description: Discussion around specter https://github.com/redplanetlabs/specter

itaied 2023-05-22T09:29:14.035269Z

How can I collect the depth of a nested vector? For example

(def TABLE
  (recursive-path
   [] p
   [(cond-path
     vector? (sp/stay-then-continue ALL p)
     map? [(submap [:rows :columns])
           MAP-VALS
           (pred vector?)
           [ALL p]])]))
(select TABLE {:rows [[1 [2]]]} results in [[1 [2]] [2]] . I would like to send to the transformation function the depth of each element (for example, [1 [2]] depth is 2, and [1] depth is 3.

nathanmarz 2023-05-22T17:42:43.921059Z

that's possible with collect-one or VAL

👍 1