随笔分类 -  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 阅读全文
posted @ 2019-03-04 20:57 Zhentiw 阅读(277) 评论(0) 推荐(0) 编辑
摘要:Transducers are composable algorithmic transformations. They are independent from the context of their input and output sources and specify only the e 阅读全文
posted @ 2019-02-20 20:54 Zhentiw 阅读(275) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-17 21:44 Zhentiw 阅读(213) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-17 20:52 Zhentiw 阅读(223) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-17 20:24 Zhentiw 阅读(167) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-16 20:23 Zhentiw 阅读(232) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-01-16 17:44 Zhentiw 阅读(191) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示