
20 Aug
2020
20 Aug
'20
12:41 p.m.
On Thu, 20 Aug 2020, Ignat Insarov wrote:
This function first appeared _(to my knowledge)_ in [a Stack Overflow answer][1]. I found it useful several times, and eventually [I extended it to a family of 4 derived functions][2]: `converge`, `convergeBy`, `fixp` and `fixpBy`.
* `convergeBy` is like `takeWhile` but with a binary predicate. * `converge` cuts a list at a point where it starts to repeat itself. * `fixp` takes the last element.
This one may help: https://hackage.haskell.org/package/utility-ht-0.0.15/docs/Data-List-HT.html...