FoldWhileList¶
Like FoldList, but stops once the predicate returns False.
A fifth argument gives the test the last m results (or All of them),
and a sixth shifts where the fold stops — negative to stop earlier:
The operator form folds a list, taking its first element as the start: