Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Update transduce to Official Transformer Protocol #652

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

Update transduce to Official Transformer Protocol #652

kevinbeaty opened this issue Apr 4, 2015 · 2 comments

Comments

@kevinbeaty
Copy link

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
}
mattpodwysocki added a commit that referenced this issue Apr 6, 2015
@mattpodwysocki
Copy link
Member

@kevinbeaty done as per version 2.5.1

@kevinbeaty
Copy link
Author

@mattpodwysocki Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants