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

Ross Paterson R.Paterson at city.ac.uk
Thu Nov 20 16:00:10 UTC 2014


On Thu, Nov 20, 2014 at 12:37:49AM +0000, Ross Paterson 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:
> 
> [...]

Actually this is pretty much what the existing fromList2 does.


More information about the Haskell-Cafe mailing list