
On Tue, Mar 28, 2017 at 11:57 AM, David Feuer
You probably should bind the value you're forcing,
I'm guessing a bang pattern should do the trick: ascending a as (b:bs) | a `cmp` b /= GT = ascending b (\ys -> as (a:ys)) bs ascending a as bs = let !v = as [a] in v : sequences bs mergePairs (a:b:xs) = let !v = merge a b in v : mergePairs xs mergePairs xs = xs {-# INLINE merge #-} merge as@(a:as') bs@(b:bs')
even if the difference is small.
Out of curiosity, why would there be a difference at all?
On Mar 28, 2017 2:51 PM, "Siddhanathan Shanmugam" < siddhanathan+eml@gmail.com> wrote:
mergePairs (a:b:xs) = merge a b `seq` merge a b : mergePairs xs
as well.
On Tue, Mar 28, 2017 at 11:43 AM, Gregory Popovitch
wrote: OK, so current proposed changes are below:
test results look good.
Thanks,
greg
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries