[Haskell-cafe] Improving *> and >> for Data.Sequence

David Feuer david.feuer at gmail.com
Thu Nov 20 01:26:51 UTC 2014


On Nov 19, 2014 7:38 PM, "Ross Paterson" <R.Paterson at city.ac.uk> wrote:
>
> On Wed, Nov 19, 2014 at 02:58:46PM -0500, David Feuer wrote:
> > I got to looking at <*> just now, and it suggests the
> > following question: is there a particularly efficient way to build a
Seq when
> > its ultimate size is known in advance, avoiding the usual incremental
> > rebuilding?
>
> The following avoids the rebuilding, but I haven't tweaked or timed it:

I don't know how well this will work for fromList, but it looks like it
will almost certainly be good for <*> and *>. I'll try it out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141119/bf23ad07/attachment.html>


More information about the Haskell-Cafe mailing list