Open ParadaCarleton opened 12 months ago
Zip
expects Transducer
s in its arguments and gives a new combined transducer. So the use case is something like this
1:10 |> Zip(Map(x -> x + 1), Map(x -> x - 1)) |> collect
that is is starting with data, we feed it into a transducer and finally collect results.
I am not sure if Transducers
has its own way to zip sources but plain zip
from Base
may work for you
zip(1:10, 0:9) |> Map(sum) |> collect
Zip
expectsTransducer
s in its arguments and gives a new combined transducer. So the use case is something like this
OK, so in that case, it probably makes sense to error when we call Zip
(I'm guessing the arguments for Zip
don't have type annotations), and that should probably be reflected in the documentation. (Possibly even in a new/different name and deprecating Zip
?)
I think it might make sense to just allow generic collections as well, since they correspond to the degenerate case where we're ignoring the input.
I'm actually not sure how
Zip
is supposed to work, if things that work withzip
error.