Skip to content
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

Update transduce to Official Transformer Protocol #1

Closed
kevinbeaty opened this issue Apr 4, 2015 · 0 comments
Closed

Update transduce to Official Transformer Protocol #1

kevinbeaty opened this issue Apr 4, 2015 · 0 comments

Comments

@kevinbeaty
Copy link
Member

Change transducers implementation to support "Official Transformer Protocol" discussed in cognitect-labs/transducers-js#20 . Both transducers.js and transducers-js have been updated to support it.

Summary of changes:

// anywhere you use a transformer
// (including transducer implementations)
var xf = {
   init: function()
   step: function(acc, item)
   result: function(acc)
}
// becomes
var xf = {
   '@@transducer/init': function()
   '@@transducer/step': function(acc, item)
   '@@transducer/result': function(acc)
}
// reduced wrapper object changes from 
{
   value: acc,
   __transducers_reduced__: true
}
// to
{
   '@@transducer/value': acc,
   '@@transducer/reduced':true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant