Transducers for JavaScript
github.com
Transducers for JavaScript
1–10 of 27 posts
Re: Transducers for JavaScript
#2"To me, transducers are a generic and composable way to operate on a collection of values, producing a new value or new collection of new values. The word 'transducer' itself can be split into two parts that reflect this definition: 'transform' — to produce some value from another — and 'reducer' — to combine the values of a data structure to produce a new one."
Re: Transducers for JavaScript
#3 var f=_.compose( _.partialRight(_.filter,isEven),_.partialRight(_.map,inc)) ;
or something.Re: Transducers for JavaScript
#4From: http://phuu.net/2014/08/31/csp-and-transducers.html "To me, transducers are a generic and composable way to operate on a collection of values, producing a new value or new collection of new values. The word 'transducer' itself can be split into two parts that reflect this definition: 'transform' — to produce some value from another — and 'reducer' — to combine the values of a data structure to produce a new one…
Re: Transducers for JavaScript
#5So I checked the definition of a transducer,but i'm not smart enough to get it. What the difference between that library and say lodash where I can bind and compose functions? because it seems like the same stuff var f=_.compose( _.partialRight(_.filter,isEven),_.partialRight(_.map,inc)) ; or something.
Re: Transducers for JavaScript
#6From: http://phuu.net/2014/08/31/csp-and-transducers.html "To me, transducers are a generic and composable way to operate on a collection of values, producing a new value or new collection of new values. The word 'transducer' itself can be split into two parts that reflect this definition: 'transform' — to produce some value from another — and 'reducer' — to combine the values of a data structure to produce a new one…
Re: Transducers for JavaScript
#7So I checked the definition of a transducer,but i'm not smart enough to get it. What the difference between that library and say lodash where I can bind and compose functions? because it seems like the same stuff var f=_.compose( _.partialRight(_.filter,isEven),_.partialRight(_.map,inc)) ; or something.
I think it only iterates over the collection once.
Re: Transducers for JavaScript
#8So I checked the definition of a transducer,but i'm not smart enough to get it. What the difference between that library and say lodash where I can bind and compose functions? because it seems like the same stuff var f=_.compose( _.partialRight(_.filter,isEven),_.partialRight(_.map,inc)) ; or something.
Re: Transducers for JavaScript
#9as in var evens = [1,2,3,4].where(x => x%2 == 0).toarray()
no ?
Re: Transducers for JavaScript
#10So I checked the definition of a transducer,but i'm not smart enough to get it. What the difference between that library and say lodash where I can bind and compose functions? because it seems like the same stuff var f=_.compose( _.partialRight(_.filter,isEven),_.partialRight(_.map,inc)) ; or something.
I think it only iterates over the collection once.