Proposal #3271: new methods for Data.Sequence

Ross Paterson ross at soi.city.ac.uk
Thu Aug 6 07:32:57 EDT 2009


On Mon, Jul 20, 2009 at 02:33:52PM -0400, Louis Wasserman wrote:
> Among all the methods I added to Data.Sequence, the most code-intensive
> are tails/inits and consDigitToTree/snocDigitToTree.
>
> The second was more intensively used with some previous zipWith
> implementations that have since been replaced, but they add moderate
> speed improvements to the significant amount of already-bulky code
> for appending two sequences, and I can live with that on my conscience.

In the latest version of your patch, consDTree/snocDTree are defined
using foldr/foldl, which expands to repeated consTree/snocTree.
In that case, it would be simpler to go back to writing out the repeated
consTree/snocTree.


More information about the Libraries mailing list