随笔分类 -  Compose

上一页 1 ··· 3 4 5 6 7
摘要:We refactor a standard node callback style workflow into a composed task-based workflow. For example we have the code as following: We want to wrap as 阅读全文
posted @ 2016-12-19 16:29 Zhentiw 阅读(195) 评论(0) 推荐(0)
摘要:We examine the data structure Task, see some constructors, familiar methods, and finally how it captures side effects through laziness. We using a 'da 阅读全文
posted @ 2016-12-18 20:37 Zhentiw 阅读(245) 评论(0) 推荐(0)
摘要:If change the data a litte bit: Because the view: null, then it will skip .map(sum). 阅读全文
posted @ 2016-12-16 19:49 Zhentiw 阅读(342) 评论(0) 推荐(0)
摘要:Let's we want to combine two account accidently have the same name. So, here we can use Semi-group to combine them, because the semi-group have the kn 阅读全文
posted @ 2016-12-15 19:32 Zhentiw 阅读(220) 评论(0) 推荐(0)
摘要:An introduction to concatting items via the formal Semi-group interface. Semi-groups are simply a type with a concat method that are associative. We d 阅读全文
posted @ 2016-12-15 19:19 Zhentiw 阅读(384) 评论(0) 推荐(0)
摘要:For if..else: 阅读全文
posted @ 2016-12-14 02:16 Zhentiw 阅读(251) 评论(0) 推荐(0)
摘要:We define the Either type and see how it works. Then try it out to enforce a null check and branch our code. Now, we try to make Box more useful. We w 阅读全文
posted @ 2016-12-13 03:25 Zhentiw 阅读(262) 评论(0) 推荐(0)
摘要:After understanding how Box is, then we are going to see how to use Box to refacotr code, to un-nested expression. For example, we have code: So how i 阅读全文
posted @ 2016-12-12 03:16 Zhentiw 阅读(411) 评论(0) 推荐(0)
摘要:We'll examine how to unnest function calls, capture assignment, and create a linear data flow with a type we call Box. This is our introduction to wor 阅读全文
posted @ 2016-12-11 21:47 Zhentiw 阅读(343) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7