From 1317790b1b5e5d101777869c38313c1d0de9037a Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Mon, 2 Oct 2017 08:52:28 -0400 Subject: [PATCH] Updated Using Specter Recursively (markdown) --- Using-Specter-Recursively.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Using-Specter-Recursively.md b/Using-Specter-Recursively.md index cfc6875..42c5408 100644 --- a/Using-Specter-Recursively.md +++ b/Using-Specter-Recursively.md @@ -137,12 +137,12 @@ This example comes from [a Stack Overflow question](https://stackoverflow.com/qu ```clojure => (defn find-index-route [v data] (let [walker (recursive-path [] p - (if-path sequential? - [INDEXED-VALS - (if-path [LAST (pred= v)] - FIRST - [(collect-one FIRST) LAST p])])) - ret (select-first walker data)] + (if-path sequential? + [INDEXED-VALS + (if-path [LAST (pred= v)] + FIRST + [(collect-one FIRST) LAST p])])) + ret (select-first walker data)] (if (or (vector? ret) (nil? ret)) ret [ret]))) #'playground.specter/find-index-route => (find-index-route :my-key '(1 2 :my-key))