@adamnfish has found that the tests for List.Extra.stoppableFoldl aren't really testing the main promise of the function: that it will stop running the function after a Stop is returned.
Together we're adding a test which will throw a RangeError (stack overflow) if stoppableFoldl goes through the whole list. We've verified it by temporarily changing the implementation of stoppableFoldl to just be a List.foldl.
@adamnfish has found that the tests for
List.Extra.stoppableFoldl
aren't really testing the main promise of the function: that it will stop running the function after aStop
is returned.Together we're adding a test which will throw a RangeError (stack overflow) if
stoppableFoldl
goes through the whole list. We've verified it by temporarily changing the implementation ofstoppableFoldl
to just be aList.foldl
.