These are chat archives for ramda/ramda

18th
Dec 2016
Iain Freestone
@iainfreestone
Dec 18 2016 17:32
Hi, I was wondering if anyone could explain why following example returns [["a", "c", "e"], ["a", "c", "e"]] rather than [["a", "c", "e"], ["b", "d"]]
var isEven = function (n) { return n % 2 === 0; }
var indexEven = (val,idx) => isEven(idx);

R.addIndex(R.filter)(indexEven, ['a','b','c','d','e']) //["a", "c", "e"]
R.addIndex(R.reject)(indexEven, ['a','b','c','d','e']) // ["b", "d"]

R.addIndex(R.partition)(indexEven, ['a','b','c','d','e']); //[["a", "c", "e"], ["a", "c", "e"]]
Brad Compton (he/him)
@Bradcomp
Dec 18 2016 17:43
@iainfreestone Check this out: ramda/ramda#2000
Iain Freestone
@iainfreestone
Dec 18 2016 17:44
@Bradcomp Thank you