-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transducers.drop(n) not working as expected #58
Comments
not sure if related, but dedupe() doesn't work either. console.log(xd.seq([1, 1, 1, 2, 2, 3, 4, 5, 5, 5, 5, 5, 6, 7], xd.dedupe()))
// as expected - [ 1, 2, 3, 4, 5, 6, 7 ]
go(function*(){
var c = chan(7);
pipeline(c, xd.dedupe(), fromColl([1, 1, 1, 2, 2, 3, 4, 5, 5, 5, 5, 5, 6, 7]));
var res = yield into([], c);
console.log(res);
// - expected - [ 1, 2, 3, 4, 5, 6, 7 ]
// - actual - [ 1, 1, 1, 2, 2, 3, 4, 5, 5, 5, 5, 5, 6, 7 ]
}) |
Seems to be a |
Actually that's how In Clojure it's useful for parallelization of non-stateful transformations. In single-threaded js runtimes it's actually quite useless. |
We need to do the following
|
ah, I see what you're saying. I worked around it by passing a transducer to the created channel. thanks much. |
The text was updated successfully, but these errors were encountered: