Discussion: name for reversing fromList in Data.Sequence

David Feuer david.feuer at gmail.com
Thu Sep 1 19:59:42 UTC 2016

FYI, this isn't one I feel super-strongly about, and I'm not particularly
keen on *writing* the function, so if people don't want it I'll back off

On Sep 1, 2016 3:57 PM, "David Feuer" <david.feuer at gmail.com> wrote:

> My concern is for what happens when such rules don't fire. If someone
> converts a large list to a sequence only to reverse it, then the
> badly-ordered sequence will end up being evacuated by the garbage collector
> unnecessarily, pushing up the next major collection.
> In contrast, I've used rewrite rules to fuse map with reverse; the worst
> case there is some extra churn in the nursery.
> That said, if others don't consider it important enough, or have enough
> faith that rules will fire in this case (which may very well be), I can go
> the rules route.
> On Sep 1, 2016 3:51 PM, "John Wiegley" <johnw at newartisans.com> wrote:
> >>>>> "DF" == David Feuer <david.feuer at gmail.com> writes:
> FD> I'd like to add a function
> DF> fromListReversing :: [a] -> Seq a
> Hi David,
> Perhaps rather than proliferating the libraries with fused compositions
> that
> are faster than their composites via (.), we could defer things like this
> to
> REWRITE rules.
> --
> John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
> http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160901/d388d426/attachment.html>

More information about the Libraries mailing list