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.
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?)
State can be stored inside transducers. Corresponding slides:
https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/Transducers/00.34.26.jpg https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/Transducers/00.36.36.jpg
See Rich transducers talk - https://www.youtube.com/watch?v=6mTbuzafcII
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With