上一页 1 ··· 268 269 270 271 272 273 274 275 276 ··· 477 下一页
摘要: We've seen how we can transduce from arrays or other iterables, but plain objects aren't iterable in Javascript. In this lesson we'll modify our trans 阅读全文
posted @ 2019-03-04 20:57 Zhentiw 阅读(301) 评论(0) 推荐(0)
摘要: For example we have 'a' -> 1 'b' -> 2 .. 'z' -> 26 By given "12", we can decode the string to give result "ab" or 'L', 2 ways to decode, your function 阅读全文
posted @ 2019-03-04 01:58 Zhentiw 阅读(343) 评论(0) 推荐(0)
摘要: We see three varied examples of where natural transformations come in handy. Let's mark the law here for Natural Transformations: Then let's see why w 阅读全文
posted @ 2019-03-01 22:24 Zhentiw 阅读(307) 评论(0) 推荐(0)
摘要: Natural Transformations, let's explain it by using a coding example, for example, we have a 'Either' holding a value 'a' and we want to transform a' T 阅读全文
posted @ 2019-03-01 21:30 Zhentiw 阅读(275) 评论(0) 推荐(0)
摘要: We use the traversable instance on List to reimplement Promise.all() type functionality. For example we want to conver: Conver array of Task, into Tas 阅读全文
posted @ 2019-03-01 14:31 Zhentiw 阅读(291) 评论(0) 推荐(0)
摘要: We annihilate the need for the ol' nested for loop using Applicatives. For example we have this kind of nested loop code: We can refactor it by using 阅读全文
posted @ 2019-02-28 20:53 Zhentiw 阅读(194) 评论(0) 推荐(0)
摘要: Working our way backwards from solution to problem, we define an applicative functor, then use it to apply a function of multiple arguments. For examp 阅读全文
posted @ 2019-02-28 19:02 Zhentiw 阅读(222) 评论(0) 推荐(0)
摘要: Given a string, find the longest subsequence consisting of a single character. Example: longest("ABAACDDDBBA") should return {'D': 3}. 阅读全文
posted @ 2019-02-28 03:04 Zhentiw 阅读(233) 评论(0) 推荐(0)
摘要: We refactor a standard node callback style workflow into a composed task-based workflow. Original Code: Using Task: Using Async: 阅读全文
posted @ 2019-02-27 16:05 Zhentiw 阅读(261) 评论(0) 推荐(0)
摘要: Let's examine a pointfree way to write these applicative calls. Since we know map is equal to of/ap, we can write generic functions that will ap as ma 阅读全文
posted @ 2019-02-27 03:09 Zhentiw 阅读(193) 评论(0) 推荐(0)
上一页 1 ··· 268 269 270 271 272 273 274 275 276 ··· 477 下一页