From 1906fa0ba252543de65c1ab666914584c8812d80 Mon Sep 17 00:00:00 2001 From: Ross Paterson Date: Wed, 2 Jun 2010 21:21:54 +0000 Subject: [PATCH] expand Foldable instance for Array --- Data/Foldable.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Data/Foldable.hs b/Data/Foldable.hs index 9f7d3e9..c44f0cd 100644 --- 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 + 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. -- 1.7.10.4