摘要: * log的二次封装 * 具体代码 ```js function print(info) { const contentArr = info.map(info => info.content); const styleArr = info.map(info => info.style).map(st 阅读全文
posted @ 2023-08-27 23:08 HuangBingQuan 阅读(13) 评论(0) 推荐(0) 编辑
摘要: * 在函数式编程中,科里化最重要的是把多参函数变为单参函数 * 举个例子:我们创建一个通用函数来复用 ```js // 实现科里化 Object.prototype.curry = function (func, ...args) { const that = this; // 得到从下标1开始的参 阅读全文
posted @ 2023-08-27 00:06 HuangBingQuan 阅读(3) 评论(0) 推荐(0) 编辑