summaryrefslogtreecommitdiff
path: root/src/unheard/theory.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/unheard/theory.clj')
-rw-r--r--src/unheard/theory.clj33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/unheard/theory.clj b/src/unheard/theory.clj
index 5314ea7..30977a9 100644
--- a/src/unheard/theory.clj
+++ b/src/unheard/theory.clj
@@ -6,27 +6,26 @@
(defn note
[>clock start duration >value]
- (lift (time-object start
- duration
- (m/stream
- (m/ap
- (let [[c v] (m/?> (m/relieve
- (m/latest vector >clock >value)))]
- v))))))
+ (lift (time-object
+ start
+ duration
+ (m/stream (m/ap (let [[c v] (m/?> (m/relieve
+ (m/latest vector >clock >value)))]
+ v))))))
;; BUG: 2d7f861
(defn read
[>clock timeline]
- (m/relieve
- (m/reductions {} nil
- (m/eduction (map vals)
- (m/reductions
- (fn [acc {:keys [id state value]}]
- (if (= :up state)
- (assoc acc id value)
- (dissoc acc id)))
- {}
- (reconcile-merge (point-query timeline >clock)))))))
+ (m/relieve (m/reductions
+ {}
+ nil
+ (m/eduction
+ (map vals)
+ (m/reductions
+ (fn [acc {:keys [id state value]}]
+ (if (= :up state) (assoc acc id value) (dissoc acc id)))
+ {}
+ (reconcile-merge (point-query timeline >clock)))))))
(comment
(def c (atom 0))