随笔分类 - Transducer
摘要:We've seen how we can transduce from arrays or other iterables, but plain objects aren't iterable in Javascript. In this lesson we'll modify our trans
阅读全文
摘要:Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the e
阅读全文
摘要:Transducers remove the requirement of being lazy to optimize for things like take(10). However, it can still be useful to "bind" a collection to a set
阅读全文
摘要:A frequent use case when transducing is to apply a transformation to items without changing the type of the collection. In this lesson, we'll create a
阅读全文
摘要:Our transduce function is powerful but requires a lot of boilerplate. It would be nice if we had a way to transduce into arrays and objects without ha
阅读全文
摘要:So far we've been transducing by manually calling .reduce() on arrays, but we want to be able to transduce over other collection types as well. In thi
阅读全文
摘要:To make our composition more readable and easier to name we are going to ceate a compose function we can use to avoid having to manually nest our tran
阅读全文