Closed treeowl closed 9 years ago
I imagine perhaps this was originally implemented as starve m cont = (stopped ~> m) <> cont
and then optimized to the present form before it was first committed.
Actually the original form was as you see it- I knew of neither stopped
nor the Semigroup
instance when I wrote that- it was just a stepping stone to get to groupingOn
that I thought might be useful to others.
I don't know what performance implications of changing this to be (stopped ~> m) <> cont
would be (if any), but it'd be much more concise.
I'm not terribly worried about the conciseness of the internal implementation -- If need be we can document laboriously derived internals with such pithy phrases and get much of the expository benefits without paying any performance hit.
In any event, let's generalize starve
.
See pull request #55
Merged.
Currently,
There is no need to use the
Refl
, and thus no need to restrict the machine to be aProcessT
.If there's actually some reason to force that argument, of course, we could go with