Foldr/build fusion and reverse

David Feuer david.feuer at gmail.com
Mon Aug 11 20:01:31 UTC 2014


Currently, reverse does not participate at all. This law looks eminently
exploitable:

foldr c n (reverse xs) = foldl (flip c) n xs

foldr c n $ reverse $ build xs =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140811/2d16dcb4/attachment.html>


More information about the Libraries mailing list