These are chat archives for ramda/ramda

8th
May 2019
Rafi
@Rafi993
May 08 10:19
Hi there is there a way to get index in ramdajs for each ?
Riku Tiira
@rikutiira
May 08 10:23
R.addIndex(R.forEach) creates a function with index included
Rafi
@Rafi993
May 08 10:25
oh, I didn't know you could do that with forEach
Mike Chen
@mike442144
May 08 13:57
Hey, does anybody know the time cost of 'sortBy' function in ramda?
1point7point4
@1point7point4
May 08 13:57
prolly uses quicksort unless otherwise stated
Rakesh Pai
@rakeshpai
May 08 13:59
It uses the native array.sort. https://github.com/ramda/ramda/blob/master/source/sortBy.js#L38 So cost is runtime-dependent, and isn't affected by ramda.
Mike Chen
@mike442144
May 08 14:06
cool! thanks a lot. let me check.
I'm sure that native sort method is optimized by the compiler so it's faster than usual.
Rakesh Pai
@rakeshpai
May 08 14:09
Yeah, you probably won't be able to go faster.
Mike Chen
@mike442144
May 08 14:21
Yep, so I'm going to check elsewhere.