Skip to content
Browse files

Add a function that detects nested vector depth

  • Loading branch information...
swlkr committed Mar 19, 2019
1 parent a1df0eb commit b5582e19784312c40bc339ba7e734bcc59708f70
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/coast/utils.clj
@@ -186,3 +186,12 @@
(with-meta (symbol name)
(meta value))

(defn depth
(depth val 0))
([val idx]
(if (sequential? val)
(depth (first val) (inc idx))

0 comments on commit b5582e1

Please sign in to comment.
You can’t perform that action at this time.