Closed treeowl closed 1 year ago
How do you propose to reconcile this with #17? Are you still interested in the latter, despite the pitfalls of the Foldable
class?
@mixphix Is there some tension between this ticket and that one that I don't see?
One would imagine the Foldable
instance would overlap with the list instance. The implementation mentioned in that ticket would work for this, written explicitly, though.
@mixphix No one ever suggested a general instance for everything Foldable
. Just a tool for writing instances for certain Foldable
types (the ones where all the laziness is in the elements folded over).
That's what I get for reading GitHub issues at 2 in the morning.
We've all been there. I was up past six this morning. Ugh!
We can do something like
This is useful when the list isn't going to be used again. In practice, this mostly occurs
For fun, here it is point free (I wouldn't use this):