These are chat archives for ramda/ramda

25th
Mar 2017
Johnny Hauser
@m59peacemaker
Mar 25 2017 01:44
If ramda didn't have those optimized internal curries, how significant would that be?
Johnny Hauser
@m59peacemaker
Mar 25 2017 01:50
If you are building a library, you should use a dumb/manual curry1, curry2, curry3 and maybe curry4 internally, right?
rather than a dynamic curry/curryN
Denis Stoyanov
@xgrommx
Mar 25 2017 01:54
@m59peacemaker anyway currying is really hard for js (about performance, no optimisation in V8, Gecko, etc)
Ryan Stegmann
@rstegg
Mar 25 2017 04:47
could someone explain or illustrate the use of zip [sorry if this is asked a lot]
Denis Stoyanov
@xgrommx
Mar 25 2017 04:50
@rstegg zip((a, b) => someFn(a, b), [1,2,3], [4,5,6])
Ryan Stegmann
@rstegg
Mar 25 2017 04:52
so its like "combineWithoutDuplicates"?
Denis Stoyanov
@xgrommx
Mar 25 2017 04:53
@rstegg like zipper (combine by equal index)
Ryan Stegmann
@rstegg
Mar 25 2017 04:53
ah gotcha, thx!
Johnny Hauser
@m59peacemaker
Mar 25 2017 21:09
If you're writing a function that creates and returns an array, so that it's acceptable to internally mutate it, is it actually much better to mutate it and avoid immutability?
in my case, the function is recursive
so rather than creating a new array everytime, I pass in the array for it to use
Simon Friis Vindum
@paldepind
Mar 25 2017 21:16
@m59peacemaker I wouldn't say it much better— unless performance is a concern.
Johnny Hauser
@m59peacemaker
Mar 25 2017 21:16
if you publish it on npm, you never know
ofc, my code sucks, so it probably doesn't matter haha
Simon Friis Vindum
@paldepind
Mar 25 2017 21:19
@m59peacemaker If it is for a library I'd definitely do it like that. But then you might want to avoid a recursive function altogether to avoid stack overflow
Johnny Hauser
@m59peacemaker
Mar 25 2017 23:50
would you call a function that takes an array and slices it in every possible combination sliceAtEverywhere?
or any better suggestions for my npm package?