projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5a600d6
)
expand Foldable instance for Array
author
Ross Paterson
<ross@soi.city.ac.uk>
Wed, 2 Jun 2010 21:21:54 +0000
(21:21 +0000)
committer
Ross Paterson
<ross@soi.city.ac.uk>
Wed, 2 Jun 2010 21:21:54 +0000
(21:21 +0000)
Data/Foldable.hs
patch
|
blob
|
history
diff --git
a/Data/Foldable.hs
b/Data/Foldable.hs
index
9f7d3e9
..
c44f0cd
100644
(file)
--- a/
Data/Foldable.hs
+++ b/
Data/Foldable.hs
@@
-162,6
+162,9
@@
instance Foldable [] where
instance Ix i => Foldable (Array i) where
foldr f z = Prelude.foldr f z . elems
instance Ix i => Foldable (Array i) where
foldr f z = Prelude.foldr f z . elems
+ foldl f z = Prelude.foldl f z . elems
+ foldr1 f = Prelude.foldr1 f . elems
+ foldl1 f = Prelude.foldl1 f . elems
-- | Fold over the elements of a structure,
-- associating to the right, but strictly.
-- | Fold over the elements of a structure,
-- associating to the right, but strictly.