These are chat archives for ramda/ramda

25th
May 2019
Nika
@overflowz
May 25 17:05

Hi, does anyone know what is wrong with R. and R.call? While R.apply respects R., R.call does not. Here's an example:

const fn = R.curry((x, y) => x + y);

const withApply = R.pipe(
  R.apply(R.__, [1]),
  R.apply(R.__, [2]),
);

const withCall = R.pipe(
  R.call(R.__, 1),
  R.call(R.__, 2),
);

withApply(fn); // returns 3, ok cool
withCall(fn); // returns function (t,r) ...

Thing is, how can I make it work with R.call rather than R.apply?

ugh, should be "R.__"
or is it because you cannot really know how much arguments you'll pass to R.call?
I'm kinda confused.