map
needs a unary function.
compose
in v16 or v17. I'm planning on writing up a proposal to reverse that. I was planning on doing it days ago, but life got in the way.
compose
/pipe
, and we need to figure out how to deal with this.
R.converge(concatAll,
R.map(R.add(1)),
R.map(R.multiply(3)),
R.map(R.flip(R.divide)(2))
)([2, 4, 6]);
//=> [3, 5, 7, 6, 12, 18, 1, 2, 3]
function scoreBy(fn, list) {
const scores = R.map(fn, list);
const zipped = R.zip(scores, list);
const scored = R.sortBy(R.head, zipped);
return R.last(R.last(scored));
}