Fork me on GitHub
#core-logic
<
2021-11-26
>
Ben Sless08:11:15

It works

clojure.lang.IReduceInit
  (reduce [_ rf init]
    (let [init (rf init a)]
      (if (reduced? init)
        @init
        (reduce rf init (pull f)))))
where
(defn pull
  [f]
  (if (instance? clojure.lang.Fn f)
    (recur (f))
    f))