jlongster / transducers.js

A small library for generalized transformation of data (inspired by Clojure's transducers)
BSD 2-Clause "Simplified" License
1.73k stars 54 forks source link

Ensure xform.result called on Reduced.val #15

Closed kevinbeaty closed 9 years ago

kevinbeaty commented 9 years ago

Should still call xform.result() on early termination or Reduced value.

jlongster commented 9 years ago

Thanks, I just got bit by this while testing one of the other PRs, heh.

kevinbeaty commented 9 years ago

No problem. Thanks for merging.

As a somewhat unrelated note, I tried both your library and transducers-js as the backing transducers implementation in my underscore-transducer library and realized how common your protocols were. Great job.

In that spirit, I created an organization and plan on creating general utilities for any transducer library that conforms to the common protocols: https://github.com/transduce/transduce

They are mostly empty, but I plan to fill it out this weekend. I will be more than happy to add you as a member if you are interested.

https://github.com/transduce/transduce-protocol is mostly complete, but needs testing. The other libraries (and eventually underscore-transducer) will be implemented in terms of the defined protocols.