随笔分类 - Compose
摘要: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
阅读全文
摘要:We examine the data structure Task, see some constructors, familiar methods, and finally how it captures side effects through laziness. We using a 'da
阅读全文
摘要:If change the data a litte bit: Because the view: null, then it will skip .map(sum).
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:For if..else:
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号