3 ms·
> 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
by Tehnix 7y ago
> 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`.
- tsimionescu 7y agoIt 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.