随笔分类 -  Javascript

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 30 下一页
摘要:We rewrite the Box example using lazy evaulation. Here is Box example: So how to make it as Lazy Box? The Answer is instead of passing a value to the 阅读全文
posted @ 2019-02-26 18:11 Zhentiw 阅读(348) 评论(0) 推荐(0)
摘要:Previously we have seen how to use Concat with reduce: To simply this, we can use 'fold': Javascript arrray doesn't have 'fold' so we use immutable-ex 阅读全文
posted @ 2019-02-26 18:05 Zhentiw 阅读(199) 评论(0) 推荐(0)
摘要:What is applicative functor: the ability to apply functors to each other. For example we have tow functors: Container(2), Container(3) We cannot just 阅读全文
posted @ 2019-02-25 19:12 Zhentiw 阅读(224) 评论(0) 推荐(0)
摘要:monoids is a semi-group with a neutral element. A semigroup, it does not have an element to return so it's not a safe operation, whereas with the mono 阅读全文
posted @ 2019-02-24 21:18 Zhentiw 阅读(286) 评论(0) 推荐(0)
摘要:Before we introduce what is Monad, first let's recap what is a pointed functor: A pointed functor is a Functor with .of() method Why pointed Functor i 阅读全文
posted @ 2019-02-24 21:11 Zhentiw 阅读(449) 评论(0) 推荐(0)
摘要:In this post, we are going to see how to use Ramda Lens. For example, we have data: R.lens: R.lens takes a getter and a setter: R.lensProp: There is a 阅读全文
posted @ 2019-02-24 20:12 Zhentiw 阅读(720) 评论(0) 推荐(0)
摘要: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 阅读(213) 评论(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 阅读(249) 评论(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 阅读(227) 评论(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 阅读(253) 评论(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 阅读(294) 评论(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 阅读(218) 评论(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 阅读(366) 评论(0) 推荐(0)
摘要:We would like the ability to group a series of actions to be dispatched with single dispatching functions used as handlers in various parts of our gam 阅读全文
posted @ 2019-02-12 19:44 Zhentiw 阅读(227) 评论(0) 推荐(0)
摘要:We only have a few dispatching functions that need to be known by our React Application. Each one actually has multiple actions that need to be dispat 阅读全文
posted @ 2019-02-11 20:17 Zhentiw 阅读(356) 评论(0) 推荐(0)
摘要:With our Redux implementation lousy with State ADT based reducers, it is time to hook it all up to a React Shell. Having already built out some UI/UX 阅读全文
posted @ 2019-02-11 20:02 Zhentiw 阅读(402) 评论(0) 推荐(0)
摘要:With a well defined demarcation point between Redux and our State ADT based model, hooking up to a Redux store is no different than any other Redux ba 阅读全文
posted @ 2019-02-11 19:54 Zhentiw 阅读(179) 评论(0) 推荐(0)
摘要:When using ADTs in our code base, it can be difficult to use common debugging tools like watches and breakpoints. This is mainly due to the common pat 阅读全文
posted @ 2019-02-08 17:17 Zhentiw 阅读(138) 评论(0) 推荐(0)
摘要:Not only will we need to give our initial state to a Redux store, we will also need to be able to reset our state at any time by dispatching an action 阅读全文
posted @ 2019-02-08 17:11 Zhentiw 阅读(209) 评论(0) 推荐(0)
摘要:Redux provides a convenient helper for combining many reducers called combineReducer, but it focuses in on specific attributes on our state, making it 阅读全文
posted @ 2019-02-07 22:10 Zhentiw 阅读(173) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 30 下一页