我正在尝试返回列表中的最大元素page
:
page = [1,2,3];
R.max(page); // returns a function.
R.max(-Infinity, page); // seems correct but doesn't work as expected.
我正在尝试返回列表中的最大元素page
:
page = [1,2,3];
R.max(page); // returns a function.
R.max(-Infinity, page); // seems correct but doesn't work as expected.
使用apply
功能:https ://ramdajs.com/0.22.1/docs/#apply
const page = [1, 2, 3];
R.apply(Math.max, page); //=> 3