11

In the Clojure Core documentation for the 1.7 release - the following functions

dedupe
disj!
dissoc!
filter
keep
map
random-sample
remove
replace
take-while

Have the following text in their API description

Returns a transducer when no collection is provided.

And the following functions

drop
keep-indexed
partition-all
partition-by
take
take-nth

Have the following text.

Returns a *stateful* transducer when no collection is provided.

In addition - there has been this criticism of this wording.

enter image description here

My question is: What is a stateful transducer? ie what is similar about the grouped functions. (and is this the reason that people say typing a transducer would require dependent types?)

hawkeye
  • 34,745
  • 30
  • 150
  • 304