lodash里面 _.flowRight()方法与_.curry() 结合后的一些自推
在执行lodash里面的 .flowRight()方法 里调用.curry()的方法时 对入参顺序感觉奇怪
const split = _.curry((sep, str) => _.split(str, sep))
//省略其他方法 只针对split
const f = _.flowRight(join('-'), trace('map 之后'), map(_.toLower), trace('split 之后'), split(' '))
1.对这个执行顺序感觉奇怪 调用_.curry方法
原创
2021-01-15 02:35:54 ·
303 阅读 ·
0 评论