diff options
Diffstat (limited to 'src/dompa/utils.cljc')
| -rw-r--r-- | src/dompa/utils.cljc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/dompa/utils.cljc b/src/dompa/utils.cljc index 9e1cb27..0396e8a 100644 --- a/src/dompa/utils.cljc +++ b/src/dompa/utils.cljc @@ -12,12 +12,12 @@ (fn [rf] (letfn [(step [result input] (if (sequential? input) - (reduce step result input) ;; recursively reduce over nested seq - (rf result input)))] ;; apply rf with accumulator + value + (reduce step result input) + (rf result input)))] (fn - ([] (rf)) ;; init - ([result] (rf result)) ;; completion - ([result input] (step result input)))))) ;; step + ([] (rf)) + ([result] (rf result)) + ([result input] (step result input)))))) (defn ->flat [children] (into [] (->flat-xf) children)) @@ -39,9 +39,10 @@ (defhtml test-page [] (let [n 123] - ($ :div - ($ "hello world" n)) - ($ "hello") - ($ :div (map #(%) []) "test"))) + ($ :<> + ($ :div + ($ "hello world" n)) + ($ "hello") + ($ :div)))) (test-page) |
