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 #78

Closed
kevinbeaty opened this issue Apr 4, 2015 · 1 comment
Closed

Update transduce to Official Transformer Protocol #78

kevinbeaty opened this issue Apr 4, 2015 · 1 comment

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
}
@rpominov
Copy link
Member

rpominov commented Apr 4, 2015

I've added support of new protocol and old one also still supported. Will release a patch version with this changes a bit later. Also going to remove support of old protocol in v2.0.0.

Thanks!

@rpominov rpominov closed this as completed Apr 4, 2015
rpominov added a commit that referenced this issue Apr 4, 2015
* master:
  cleanup repository after release
  1.3.1
  update changelog
  update memory-results.txt
  fix .transduce method to support new protocol (see #78)
  update deps
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

2 participants