随笔分类 -  Javascript

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 31 下一页
摘要:We examine the of function we've seen on a few types and discover it's the Pointed interface. Instead of doing constructor way of Task: We can just sa 阅读全文
posted @ 2016-12-19 16:50 Zhentiw 阅读(220) 评论(0) 推荐(0)
摘要:We learn the formal definition of a functor and look at the laws they obey. Any Functor should follow two rules: 1. Function composition: Map twice eq 阅读全文
posted @ 2016-12-19 16:43 Zhentiw 阅读(189) 评论(0) 推荐(0)
摘要: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)
摘要:Learn how to use Object.assign to combine multiple objects together. This pattern is helpful when writing libraries that have a set of default options 阅读全文
posted @ 2016-12-16 18:41 Zhentiw 阅读(476) 评论(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)
摘要:Mapping abstract values to visual representations is what data visualization is all about, and that’s exactly what D3 scales do. Turning a test score 阅读全文
posted @ 2016-12-02 21:13 Zhentiw 阅读(316) 评论(0) 推荐(0)
摘要:A part of Natural Language Processing (NLP) is processing text by “tokenizing” language strings. This means we can break up a string of text into part 阅读全文
posted @ 2016-11-08 00:37 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要:The every method returns true or false based on whether or not every item in the array passes the condition you provide in a callback function. In thi 阅读全文
posted @ 2016-11-07 19:22 Zhentiw 阅读(157) 评论(0) 推荐(0)
摘要:The key to being productive with Immutable JS is understanding how to update values that are nested. Using setIn you can place a new value directly in 阅读全文
posted @ 2016-11-07 19:14 Zhentiw 阅读(183) 评论(0) 推荐(0)
摘要:Yarn is a new JavaScript package manager that aims to be speedy, deterministic, and secure. See how easy it is to drop yarn in where you were using np 阅读全文
posted @ 2016-10-13 02:06 Zhentiw 阅读(231) 评论(0) 推荐(0)
摘要:Property access in Javascript can be problematic - especially when dealing with nested Objects and Arrays. Doing it manually and in a safe manner requ 阅读全文
posted @ 2016-10-02 16:38 Zhentiw 阅读(177) 评论(0) 推荐(0)
摘要:Source You can also start a chain of then() method calls via Promise.resolve() and execute the synchronous code inside a callback: An alternative is t 阅读全文
posted @ 2016-10-02 01:53 Zhentiw 阅读(262) 评论(0) 推荐(0)
摘要:Learn how to add, remove and test for CSS classes using the classList API. It's more powerful than using className and doesn't require any dependencie 阅读全文
posted @ 2016-09-18 03:00 Zhentiw 阅读(176) 评论(0) 推荐(0)
摘要:Monads allow you to nest computations. They are a pointed functor that adds mjoin and chain functions to combine other functors. Brian shows a number 阅读全文
posted @ 2016-09-12 04:04 Zhentiw 阅读(330) 评论(0) 推荐(0)

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 31 下一页