Uses cursors for simplicity, uses common grid bottom

This commit is contained in:
2023-10-23 23:46:01 -07:00
parent 84d6f455ff
commit 48347bb8c5
8 changed files with 98 additions and 90 deletions

View File

@@ -125,6 +125,15 @@
[] nil))
(defn synthetic-cursor [v prefix]
(let [internal-cursor (cursor v)]
(reify ICursor
(path [this]
(into prefix (path internal-cursor)))
(state [this]
(state internal-cursor)))))
(defn transact! [cursor f]
"Changes value beneath cursor by passing it to a single-argument
function f. Old value will be passed as function argument. Function