With the addition of transducers, a new opportunity for optimization has opened up, specifically around data generation functions like cycle and repeat. There are however several obstacles to simply enabling IReduce on these functions:
Create a reducable LazySeq. Something that looks/acts like LazySeq, but also has a IFn field that says "if you want to reduce, this is the reducing function", then repeat could look something like this:
(defn repeat [x] (lazy-seq-reducable (cons x (repeat x)) ;; Lazy Seq logic (fn [f] ;; Reduce logic (loop [acc (f)] (if (reduced? acc) (f @acc) (recur (f acc x))))))
While this could work, it also involves an addition allocation (the reduce logic function) on every cell in a lazy seq, probably not optimal.