These are chat archives for ramda/ramda

3rd
Apr 2016
Drew
@dtipson
Apr 03 2016 03:46
solved my problem from the other night:
const pickByIndex = compose(
  useWith(ap,[identity,of]), 
  map(nth)
);

pickByIndex([3,1,2,2,5,0,1])('gesmsa').join('');//->"message"
the pickIndexes in the cookbook didn't allow repeats, which I happened to need
Scott Sauyet
@CrossEye
Apr 03 2016 14:39
@dtipson: I missed the original problem, but this looks like a nice little function.
Drew
@dtipson
Apr 03 2016 21:05
Basically I was just looking for a way to bake the of operation into the compose(ap, map(nth))([0,2,2,3,4,1])([['a','b','c','d','e','f','g']]) version of the pickIndex variations linked from the cookbook. But I was wrapping useWith around the entire composition instead of just the ap