We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
改造函数的接口,一元参数(unary),它的作用是把一个接收多个参数的函数,变成一个只接收一个参数的函数
function unary(fn) { return function oneArg(arg) { return fn(arg); } }
["1","2","3","4","5"].map( unary( parseInt ) ); // [1,2,3,4,5]
二元就是 binary,或是函数式中的“黑话”dyadic;三元就是 tenary。顾名思义,它们分别代表的就是把一个函数的参数数量控制在 2 个和 3 个。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
改造函数的接口,一元参数(unary),它的作用是把一个接收多个参数的函数,变成一个只接收一个参数的函数
二元就是 binary,或是函数式中的“黑话”dyadic;三元就是 tenary。顾名思义,它们分别代表的就是把一个函数的参数数量控制在 2 个和 3 个。
The text was updated successfully, but these errors were encountered: