         (recur ...)                                         ;; no accumulation
         )))
 
+(defn test-inline-reduce
+  []
+  (let [coll (into [] (range 10))]
+    (report (inline-reduce
+              +
+              0
+              [[:filter odd] [:map #(* 2 %)]]
+              coll
+              ))))
+
 
 ;; --------------------------------------------------------
 ;; Example 6: DFS to do a topological sort

  [body]
  `(let [result# ~body]
     (println (expension-report ~body) "=>" result#)
     ))

(defmacro constexpr
  [fct & args]


;; --------------------------------------------------------
;; Example 5: Generating some code based on data structure
;; - Go iteratively?
;; - Show the example of efficient loop generation
;; --------------------------------------------------------

#_(defmacro inline-reduce
    [reducer initial transforms coll]
    `(reduce ~reducer ~initial ~coll))

(defmacro inline-reduce
  [reducer initial transforms coll]
  `(loop [h# (first ~coll)
          t# (rest ~coll)
          r# ~initial]
     (if h#
       (recur (first t#) (rest t#) (~reducer r# h#))
       r#)))

#_(loop [h (first coll)
         t (rest coll)
