Loop until… with Ramda
I was trying to refactor few pieces of code using Ramda and I was wondering, What could be a good approach in Ramda/Functional Programming to solve the following code: let arrayOfSomething = initArray(); for(let i = 0; SOME_INDEX_CONDITION(i)|| SOME_CONDITION(arrayOfSomething); i++) { const value = operation(arrayOfSomething); const nextValue = anotherOperation(value); arrayOfSomething = clone(nextValue) } So basically I want to iterate and apply the same pipe/composition of operations over arrayOfSomething until one of the conditions is satisfied. Is important that I am given the last value