These are chat archives for ramda/ramda

21st
Jul 2016
Aldwin Vlasblom
@Avaq
Jul 21 2016 09:23
@JAForbes Not that I know of. :)
Tushar Mathur
@tusharmath
Jul 21 2016 18:51
Is there a way i can quickly create a combinator function via ramda?
like is I have an array of 10 elements and I want to select five out of them
giving us a total of 252 combinations.
?
Gabe Johnson
@gabejohnson
Jul 21 2016 19:06
@tusharmath can you pseudo code it?
Tushar Mathur
@tusharmath
Jul 21 2016 19:07
Its going to be really long ...
Gabe Johnson
@gabejohnson
Jul 21 2016 19:07
just give me the usage
input and expected output
you can elide
Tushar Mathur
@tusharmath
Jul 21 2016 19:08

combinations(2, [1, 2, 3])  
/*
 OUTPUTS: 
 [1, 2]
 [2, 3]
 [3, 1]
*/
Gabe Johnson
@gabejohnson
Jul 21 2016 19:09
ahhh
get it
@tusharmath do the values in the list have to be unique?
Tushar Mathur
@tusharmath
Jul 21 2016 19:14
This message was deleted
you mean the input or output ?
Gabe Johnson
@gabejohnson
Jul 21 2016 19:14
input
Tushar Mathur
@tusharmath
Jul 21 2016 19:15
well that would be a special case to handle
I mean ... atleast for what I am looking for right now , they are unique
if that helps.
Tushar Mathur
@tusharmath
Jul 21 2016 19:38
@gabejohnson any idea ?
Gabe Johnson
@gabejohnson
Jul 21 2016 19:40
a couple of reduces and a uniq
Tushar Mathur
@tusharmath
Jul 21 2016 19:42
ok let me try