
John Lato wrote:
This looks to be essentially the same as the 'map' function in ListLike, and suffers from the same problem. It won't have the performance characteristics of the native map functions. Using e.g. ByteStrings, you're recreating a ByteString by snoc'ing elements.
Oh, I see now what you are after. You're right. This wouldn't play nice when creating ByteStrings (which is probably why there is no instance for Reducer Char ByteString).
This might work with UVector (I intend to try it this evening); I don't know how well the fusion framework will hold up in class dictionaries.
Do report back, as I am curious as well.
Still, the monoids package is very powerful (and I'd completely forgotten it). Perhaps there's another approach that would work?
Yay, something to mull over! :) - Jake