Re: transducers
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <CAFrFfuF-JiFYp13d1dm-M-xhEpCip6=OHMg3bTK9nsJ_yUUy6Q@mail.gmail.com> |
this is a better intro: http://conscientiousprogrammer.com/blog/2014/08/07/understanding-cloure-transducers-through-types/ this is what "conjable" refers to: http://clojuredocs.org/clojure_core/1.3.0/clojure.core/conj martin On Fri, Sep 19, 2014 at 12:46 AM, Gabriel Scherer [email protected] [ocaml_beginners] <[email protected]> wrote: > > > It's hard to read through the propaganda to see what exactly the interface > is, or what is novel (we've had lazy sequence datatypes in functional > languages for ages, and we've been reifing operation to optimize them on > the fly for ages as well, which transducer.js doesn't attempt). There are > many implementation of lazy sequences in OCaml that allow you to combine > intermediate transformations without rebuilding the whole data-structure, > see for example: > - batteries Enum module (a bit too featureful for its own good) > https://ocaml-batteries-team.github.io/batteries-included/hdoc2/BatEnum.html > - batteries Seq module > https://ocaml-batteries-team.github.io/batteries-included/hdoc2/BatSeq.html > - Simon Cruanes' iterators/generators: > http://cedeela.fr/~simon/software/gen/Gen.S.html > > > If you have specific needs (for example you want to exactly mirror > transducerjs' interface), you may want to implement something on your own. > You can do something reasonable in one afternoon's of work. > > On Fri, Sep 19, 2014 at 1:43 AM, [email protected] [ocaml_beginners] < > [email protected]> wrote: > >> >> >> What's the Ocaml equivalent of transducers, as found in the library >> transducers.js*? >> >> Or was Ocaml just exceeded by JavaScript :P >> >> >> * Transducers.js: A JavaScript Library for Transformation of Data >> <http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data> >> >> >> [image: image] >> <http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data> >> Transducers.js: A JavaScript Library for Transformation ... >> <http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data> >> Transducers.js: A JavaScript Library for Transformation of Data September >> 18 2014 If you didn't grab a few cups of coffee for my last post, you're >> going to ... >> View on jlongster.com >> <http://jlongster.com/Transducers.js--A-JavaScript-Library-for-Transformation-of-Data> >> Preview by Yahoo >> >> >> >> >> > >