You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been researching this a bit. It all works fine with maps, but fails with filters when they actually start filtering.
Core of the problem is that the firstgoroutine yielding on the channel put, but the value actually never gets put due to the filter. However, the goroutine is still suspended and resumes after the next successfull put (one that makes it through the filter)
Result is that the whole channel is out of sync.
No idea how to resolve it though, resuming the goroutine manually (next()) when the filter blocks seems awkward.
Maybe the solution lies in delegating the yield? (yield*) That would require rewriting channel.put and delegating the yield all the way to the adder (the transducer on the channel). That one would then yield or not.
The channel from your blog implementation seems broken (in firefox and regenerator):
Full test:
It outputs
It seems the "2" is not even processed by the xform.
Any idea what's going on?
The text was updated successfully, but these errors were encountered: