Add foldMapWithIndex for Data.Sequence
authorDavid Feuer <David.Feuer@gmail.com>
Fri, 13 May 2016 00:19:01 +0000 (20:19 -0400)
committerDavid Feuer <David.Feuer@gmail.com>
Sun, 22 May 2016 18:26:57 +0000 (14:26 -0400)
commit0a9285c748e175f3e6092570231a52fa340d654c
tree2781d85833e8297a9387f9ade6e46f70b8d43ef0
parentb41c6b3f2355ecbcce7df919c62c7cd6b9a274ad
Add foldMapWithIndex for Data.Sequence

This finishes the indexed folds. Implementing `foldrWithIndex`
using this function gives wretched performance, unfortunately.
It would be nice to know why, and whether anything can be done
about that.

Also, clean up some monoid syntax and import `Data.Semigroup`
qualified (we only need it to write one instance).
Data/Sequence.hs
tests/seq-properties.hs