Hey Underscore, You're Doing It Wrong!
InfoQYouTube ↗
字幕解读
Brian Lonsdorf 借 Underscore 讨论 JavaScript 函数库的参数顺序如何影响组合。以筛选奇数为例,他先固定取模的除数,再把得到的判定函数交给筛选操作,得到一个等待数组输入的新函数。他接着用词数示例说明组合:先按空格拆开字符串,再取结果的长度。最后,他用 Maybe 举例:同一个转换可以交给 map,有值时才应用,缺值时保留缺值。
存档字幕(转写方式未注明) ↗ · 引文按字幕原文展示,可点时间戳回看片段。
补充字幕原文 2
keeps returning a new function until it gets all its argumentspassing the output of one function into the input of the next