streamly
streamly copied to clipboard
Implement array builder
Array builder would basically utilize mutable arrays (see #660). We can allocate the required space in advance and keep snocing elements to the array. We can possibly have a similar interface as in Consable builder/Monoid builder (see #700)? Or can this be absorbed by the mutable array module itself?
We have builder functionality in MutArray module using sonc style operations. However, we possibly have a Builder monad to keep track of the position automatically instead of using the MutArray constructor for that, it could be more efficient for building from multiple inputs in one go.