From 6588473adf96a3eb7cfac55820ec022d4533fcbf Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Mon, 24 Aug 2015 15:45:45 -0600 Subject: Foldables --- foldables/h1.hs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 foldables/h1.hs (limited to 'foldables') diff --git a/foldables/h1.hs b/foldables/h1.hs new file mode 100644 index 0000000..16b22ac --- /dev/null +++ b/foldables/h1.hs @@ -0,0 +1,6 @@ +-- What is the type of foldMap . foldMap? Or foldMap . foldMap . foldMap, etc.? What do they do? + +foldMap :: Monoid m => (a -> m) -> t a -> m + +foldMap . foldMap :: (Foldable t, Foldable t1, Monoid m) => (a -> m) -> t (t1 a) -> m +-- They fold for multi-level of foldables -- cgit v1.2.3-70-g09d2