These are chat archives for ramda/ramda
const result = x => R.ifElse( banks => R.uniq(banks).length !== banks.length, banks => banks.length - 1, pipe(createNewState, result) // this is what I meant to post earlier )(x)
result it evaluates the expression before assigning the result of that expression to
result, the variable. At the time the variable is evaluated on the right it has no value assigned on the left.
By wrapping the recursive call in an arrow function, you delay evaluation until the variable gets assigned, and thus avoid the whole issue.