clojure 2026-03-30

If there a reason why transducer functions are always a function? I mean this kind:

(defn no-arg-transducer []
  (fn [rf] ...
     (fn ([]
Why isn’t this def instead of defn, seems like there is no state there outside the outer (fn [rf]…?

(source cat) shows an example along your thinking.

it’s a function but it takes the rf

Hm I don’t quite understand what’s the deal with preserving-reduced function there

oh it double wraps it

☝️ 1

Most such cases are transducer arities for reduction functions (e.g. distinct)

I see it now, thanks