Restriction(s) of reFoldl
The reFoldl interface is nice when you're happy with its "zero or more" semantics. If that's not cool with you, things get a bit ugly. Perhaps most importantly, "one or more" is a bit awkward to handle directly, and seems practically important. For example, a natural number is easily read by folding over one or more digits, but folding over zero digits will match everywhere you don't want.
You can define reFoldl1 in terms of reFoldl in the same way as some is defined in terms of many.
I know; I just think either reFoldl1 or some generalization thereof should probably be in the library for convenience. If you want a pull request, I can put one together.
I don't feel strongly about this; feel free to do it if you want.
I was mostly wondering if you had any ideas for a more general reFoldl restriction API.
Not sure I understand. What do you mean by "restriction API"?
reFoldl is general enough to express this pattern, but a wrapper such as reFoldl1 can be added to make this simpler to use. What kind of generalization are you thinking about?
I was thinking, vaguely, about whether there was something that would make "things like reFoldl1 easier to write. But I think you're probably right. I'll just put together a pull request for reFold1 itself.