News for hackers. Stuff that matters.
Re:Why is Idris 2 so much faster than Idris 1? by Shoue on Tuesday May 26, 2020 @06:39AM (#23309410)
When dealing with corecursion (infinite streams) you don't care about whether you terminate, but rather, whether the infinite stream is _productive_ meaning it doesn't stop producing values. The prime example of a function that's impossible(?) to prove productive (for all cases) is filter – since it takes a predicate function that decides whether values are returned or not. If you give filter a predicate that always returns false you will never produce any values, hence that wouldn't be productive.

There are no comments on this comment yet.