Creates a function that accepts up to one argument, ignoring any additional arguments.

Call the provided function, fn, with just the first argument given.

代码片段

const unary = fn => val => fn(val);

使用样例

['6', '8', '10'].map(unary(parseInt)); // [6, 8, 10]