Understanding Converge

I thought I had a reasonable handle on how converge works, but I've been staring at this problem and its criptic (to me), error message for a bit and nothing seems to be jumping out at me.

Minimal Example

const first = pipe(   
  num => compose(multiply(num), multiply(num))
console.log("First: ", first);

const second = pipe(
  converge(compose, [multiply, multiply])
console.log("Second: ", second);


First: 100
Error: First argument to _arity must be a non-negative integer no greater than ten

Read more here: https://stackoverflow.com/questions/66339685/understanding-converge

Content Attribution

This content was originally published by Mrk Sef at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: