This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
[spec-dict.main :refer [dict]]
|
||||
[net.deertopia.doerg.config :as cfg]
|
||||
[com.rpl.specter :as sp]
|
||||
[clojure.tools.logging.readable :as lr])
|
||||
[clojure.tools.logging.readable :as lr]
|
||||
[clojure.zip :as z])
|
||||
(:import (java.util UUID))
|
||||
(:refer-clojure :exclude [read-string]))
|
||||
|
||||
@@ -216,6 +217,18 @@
|
||||
rest-coll
|
||||
(concat (rest rest-coll) [nil]))))
|
||||
|
||||
(defn- =>> [wa-loc wa-loc->b]
|
||||
(if-some [loc₀ (z/down wa-loc)]
|
||||
(loop [loc-read loc₀
|
||||
loc-write loc₀]
|
||||
(let [loc-write' (z/replace loc-write (wa-loc->b loc-read))
|
||||
next-loc-read (z/next loc-read)
|
||||
next-loc-write (z/next loc-write')]
|
||||
(if (z/end? next-loc-read)
|
||||
(z/up loc-write')
|
||||
(recur next-loc-read next-loc-write))))
|
||||
wa-loc))
|
||||
|
||||
(comment
|
||||
(-> [1 2 3 4]
|
||||
(neighbourly-mapcat prn) )
|
||||
@@ -235,6 +248,7 @@
|
||||
#_
|
||||
sp/INDEXED-VALS]
|
||||
(fn [siblings x]
|
||||
(swap! r #(conj % {:siblings siblings :x x}))
|
||||
x)
|
||||
doc)]
|
||||
@r))
|
||||
|
||||
Reference in New Issue
Block a user