summaryrefslogtreecommitdiff
path: root/foldables/h1.hs
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2015-08-24 15:45:45 -0600
committerJoe Zhao <ztuowen@gmail.com>2015-08-24 15:45:45 -0600
commit6588473adf96a3eb7cfac55820ec022d4533fcbf (patch)
treedcc6d21e7ce8ed368eda73a7fd74eca5340355ed /foldables/h1.hs
parent3cf3e36b1498271f3c9162576809d886482e6d97 (diff)
downloadtypeclass-6588473adf96a3eb7cfac55820ec022d4533fcbf.tar.gz
typeclass-6588473adf96a3eb7cfac55820ec022d4533fcbf.tar.bz2
typeclass-6588473adf96a3eb7cfac55820ec022d4533fcbf.zip
FoldablesHEADmaster
Diffstat (limited to 'foldables/h1.hs')
-rw-r--r--foldables/h1.hs6
1 files changed, 6 insertions, 0 deletions
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