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
{{ message }}
This repository was archived by the owner on Jun 3, 2023. It is now read-only.
transducers.objectReduce=function(xf,init,obj){varacc=init;for(varpinobj){if(obj.hasOwnProperty(p)){acc=xf["@@transducer/step"](acc,[p,obj[p]]);// ^^^^^^^^^^^// The mapping function `x => x + 1` is applied to `['foo', 1]`// which returns `'foo,11'`if(transducers.isReduced(acc)){acc=transducers.deref(acc);break;}}}returnxf["@@transducer/result"](acc);};
This could be fixed by having the @@transducer/step function take three arguments:
An accumulation
A value
A key (optional)
However I can't seem to find a lot of support for keys in the implementation. Just wondering whether this is by design or simply an oversight? Or just me not understanding something (most likely!)?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected:
{foo:2}
— Actual:{f: 'o'}
The "issue" is here:
Then:
This could be fixed by having the
@@transducer/step
function take three arguments:However I can't seem to find a lot of support for keys in the implementation. Just wondering whether this is by design or simply an oversight? Or just me not understanding something (most likely!)?
The text was updated successfully, but these errors were encountered: