摘要: 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 阅读(219) 评论(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 阅读(230) 评论(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 阅读(172) 评论(0) 推荐(0)
摘要: Let's you have $10000, and you inverst 4 stocks. ['SPY', 'IBM', 'XOM', 'GOOG']. The allocation is [0.4, 0.4, 0.1, 0.1] separately. The way to calculat 阅读全文
posted @ 2018-01-17 20:02 Zhentiw 阅读(324) 评论(0) 推荐(0)