This commit is contained in:
2026-03-10 11:34:26 -06:00
parent d0840233c9
commit 1ff453262d

View File

@@ -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))