News for hackers. Stuff that matters.
Re:Implement with types, not your brain (2019) by Tehnix on Tuesday February 25, 2020 @02:04PM (#22416137)
> Instead of just using foldr, you've reimplemented it, and don't even know that!

This completely misses the point of the article...

The author demonstrates a general concept (type holes) on a simple piece of code, to explain and motivate how he used it the exact same methodology on a much more complex piece of code, `hoistStateIntoStateT`.

Re:Implement with types, not your brain (2019) by tsimionescu on Tuesday February 25, 2020 @02:40PM (#22416568)
It doesn't. That bit of the article shows that maybe his implementation of hoistStateIntoStateT could be replaced with an already existing function, or a composition thereof.

Also, his entire method breaks down the moment you add an [a] among your parameters (or even return values, possibly), and probably other types as well, and he doesn't even mention anything about that.