I'd like a (shuffling) transducer that's like shuffle from racket/list, but a transducer. I'd also like a (sampling k) transducer that's equivalent to (shuffling) followed by (taking k), but which uses some reservoir sampling algorithm to run in O(k) space instead of O(n) space.
I'd like a
(shuffling)
transducer that's likeshuffle
fromracket/list
, but a transducer. I'd also like a(sampling k)
transducer that's equivalent to(shuffling)
followed by(taking k)
, but which uses some reservoir sampling algorithm to run in O(k) space instead of O(n) space.