Mainly cosmetic and performance improvements on shape render.

This commit is contained in:
Andrey Antukh 2020-12-21 13:42:10 +01:00 committed by Alonso Torres
parent a3c583af1d
commit c5f4ae2242
6 changed files with 80 additions and 67 deletions

View file

@ -16,7 +16,11 @@
(defn debug! [option] (swap! *debug* conj option))
(defn -debug! [option] (swap! *debug* disj option))
(defn ^:export debug? [option] (@*debug* option))
(defn ^:export ^boolean debug?
[option]
(if *assert*
(boolean (@*debug* option))
false))
(defn ^:export toggle-debug [name] (let [option (keyword name)]
(if (debug? option)
@ -28,7 +32,7 @@
(defn ^:export tap
"Transducer function that can execute a side-effect `effect-fn` per input"
[effect-fn]
(fn [rf]
(fn
([] (rf))