上一页 1 ··· 270 271 272 273 274 275 276 277 278 ··· 499 下一页
摘要: A pointed functor is a functor with an of method What's important here is the ability to drop any value in our type and start mapping away. The benifi 阅读全文
posted @ 2019-02-23 19:37 Zhentiw 阅读(250) 评论(0) 推荐(0)
摘要: We will see a peculiar example of a pure function. This function contained a side-effect, but we dubbed it pure by wrapping its action in another func 阅读全文
posted @ 2019-02-23 19:28 Zhentiw 阅读(272) 评论(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 @ 2019-02-22 17:17 Zhentiw 阅读(253) 评论(0) 推荐(0)
摘要: It is really important to understand function signature in functional programming. The the code example below: 'map' is pointfree version of any founc 阅读全文
posted @ 2019-02-22 04:45 Zhentiw 阅读(274) 评论(0) 推荐(0)
摘要: In the class version of this component, we had a method called safeSetState which would check whether the component was still mounted before trying to 阅读全文
posted @ 2019-02-21 01:23 Zhentiw 阅读(883) 评论(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 阅读(333) 评论(0) 推荐(0)
摘要: Thanks to react-testing-library our tests are free of implementation details, so when we refactor components to hooks we generally don't need to make 阅读全文
posted @ 2019-02-19 22:53 Zhentiw 阅读(1242) 评论(0) 推荐(0)
摘要: Maybe has two types: Just / Nothing. Just() will just return the value that passed in. Nothing returns nothing... Just/ Nothing are both functors, the 阅读全文
posted @ 2019-02-19 16:45 Zhentiw 阅读(247) 评论(0) 推荐(0)
摘要: We refactor a function that uses try/catch to a single composed expression using Either. We then introduce the chain function to deal with nested Eith 阅读全文
posted @ 2019-02-19 01:40 Zhentiw 阅读(379) 评论(0) 推荐(0)
摘要: We can get a lot of utility through CLI tools invoked via npm scripts. Many of these tools have APIs with many flags and options, meaning we will freq 阅读全文
posted @ 2019-02-18 19:48 Zhentiw 阅读(168) 评论(0) 推荐(0)
上一页 1 ··· 270 271 272 273 274 275 276 277 278 ··· 499 下一页