随笔分类 -  Javascript

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 30 下一页
摘要:Proxies allow you to use functions that haven't yet been defined on an object. This means that you can invoke a function then create that function if 阅读全文
posted @ 2019-02-07 17:44 Zhentiw 阅读(429) 评论(0) 推荐(0)
摘要:Among the features introduced to the language of JavaScript in ES2019 is Array.prototype.flat. In this lesson we'll see just how easy the flat method 阅读全文
posted @ 2019-02-07 16:46 Zhentiw 阅读(154) 评论(0) 推荐(0)
摘要:The typical Redux Reducer is function that takes in the previous state and an action and uses a switch case to determine how to transition the provide 阅读全文
posted @ 2019-02-05 19:34 Zhentiw 阅读(382) 评论(0) 推荐(0)
摘要:By using the State ADT to define how our application state transitions over time, we clear up the need for a some of the boilerplate that we typically 阅读全文
posted @ 2019-02-01 17:32 Zhentiw 阅读(195) 评论(0) 推荐(0)
摘要:When we start to accumulate functions that all work on a given datatype, we end up creating a bunch of boilerplate code in almost every function to ha 阅读全文
posted @ 2019-01-31 20:24 Zhentiw 阅读(199) 评论(0) 推荐(0)
摘要:When building our stateful computations, there will come a time when we’ll need to combine two or more state transactions at the same time to come up 阅读全文
posted @ 2019-01-31 19:39 Zhentiw 阅读(380) 评论(0) 推荐(0)
摘要:We explore a means to represent the combination of our stateful computations using familiar composition. We dive into what makes this possible by talk 阅读全文
posted @ 2019-01-30 16:54 Zhentiw 阅读(295) 评论(0) 推荐(0)
摘要:The true power of the State ADT really shows when we start combining our discrete, stateful transactions. We start looking at another construction hel 阅读全文
posted @ 2019-01-30 16:40 Zhentiw 阅读(156) 评论(0) 推荐(0)
摘要:Recentlly, I am learning crocks.js ADT libaray. In the beginning, it is hard to understand when to use 'runWith', 'evalWith', 'execWith'. Until I went 阅读全文
posted @ 2019-01-29 17:22 Zhentiw 阅读(218) 评论(0) 推荐(0)
摘要:Using put to update our state for a given state transaction can make it difficult to modify a given state based on its previous value. In this lesson 阅读全文
posted @ 2019-01-29 17:13 Zhentiw 阅读(142) 评论(0) 推荐(0)
摘要:Stateful computations require the ability for their state to change overtime. We take a look on one way to replace the state portion of our stateful d 阅读全文
posted @ 2019-01-29 16:36 Zhentiw 阅读(193) 评论(0) 推荐(0)
摘要:We take a closer look at the get construction helper and see how we can use it to lift a function that maps the state portion and updates the resultan 阅读全文
posted @ 2019-01-29 16:15 Zhentiw 阅读(146) 评论(0) 推荐(0)
摘要:When you need to generate a data set, a generator function is often the correct solution. A generator function is defined with function* and then you  阅读全文
posted @ 2019-01-23 21:36 Zhentiw 阅读(135) 评论(0) 推荐(0)
摘要:A Javascript Proxy object is a very interesting es6 feature, that allows you to determine behaviors whenever a property is accessed in a target object 阅读全文
posted @ 2019-01-23 21:18 Zhentiw 阅读(268) 评论(0) 推荐(0)
摘要:As a beginner of Crocks.js, it was a problem for we to figure out when to use .map() and when to use .chain(). Of course, using the docs help: map: St 阅读全文
posted @ 2019-01-23 17:13 Zhentiw 阅读(433) 评论(0) 推荐(0)
摘要:We have the ability to select a single random card from a pile of twelve cards, but we would like to pull a total of nine. Not only that, we would lik 阅读全文
posted @ 2019-01-22 21:38 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要:Functor composition is a powerful concept that arises when we have one Functor nested in another Functor. It becomes even more powerful when both of t 阅读全文
posted @ 2019-01-18 17:52 Zhentiw 阅读(233) 评论(0) 推荐(0)
摘要:We want to be able to pick nine random cards from an array of twelve cards, but can run into problems of keeping both the cards already draw and the c 阅读全文
posted @ 2019-01-17 21:47 Zhentiw 阅读(195) 评论(0) 推荐(0)
摘要:Just like the State ADT an Array is also an Applicative Functor. That means we can do the same tricks with liftA2 with Array that we have been doing w 阅读全文
posted @ 2019-01-16 16:30 Zhentiw 阅读(718) 评论(0) 推荐(0)
摘要:In JavaScript, we often end up composing one object out of several other objects. Luckily there's a convenient spread operator which allows us to spre 阅读全文
posted @ 2019-01-16 15:45 Zhentiw 阅读(158) 评论(0) 推荐(0)

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