Add Foldable.{elem,maximum,minimum,sum,product} specializations.
authorMilan Straka <fox@ucw.cz>
Sun, 19 Oct 2014 12:07:42 +0000 (14:07 +0200)
committerMilan Straka <fox@ucw.cz>
Sun, 19 Oct 2014 12:07:42 +0000 (14:07 +0200)
commit530fc76bdd17089fcaaa655d66156abbc2092c2c
tree4b70377cc70718a11da4bd4dca68cbe29ce0c9b4
parent398e46672e498f83f28733f3a7a188651e9576b8
Add Foldable.{elem,maximum,minimum,sum,product} specializations.

Following #56, add specializations for other base-4.8 Foldable methods,
using strict folds and shortcircuiting.

The Set.elem uses only Eq a, so it runs in linear time.
Data/IntMap/Base.hs
Data/Map/Base.hs
Data/Set/Base.hs