最近在看函数式编程。用的是ramda库。但各种api使用一脸懵逼。varfunc3=_.compose(p,trace("f3:"),f);varfunc4=_.filter(_.compose(p,trace("f4:"),f));console.log(func3(3))//36console.log(func4([3]))//[3]why?whathappened
但各种api使用一脸懵逼。varfunc3=_.compose(p,trace("f3:"),f);varfunc4=_.filter(_.compose(p,trace("f4:"),f));console.log(func3(3))//36console.log(func4([3]))//[3]why?whathappened
varfunc3=_.compose(p,trace("f3:"),f);varfunc4=_.filter(_.compose(p,trace("f4:"),f));console.log(func3(3))//36console.log(func4([3]))//[3]why?whathappened
varfunc4=_.filter(_.compose(p,trace("f4:"),f));console.log(func3(3))//36console.log(func4([3]))//[3]why?whathappened
console.log(func3(3))//36console.log(func4([3]))//[3]why?whathappened
console.log(func4([3]))//[3]why?whathappened
慕标5832272
慕哥6287543
相关分类