diff options
author | David Luposchainsky <dluposchainsky@gmail.com> | 2017-08-11 14:25:57 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-17 16:42:55 -0400 |
commit | bfa9048daa170d0aec0601d1241dfa99bc8fd303 (patch) | |
tree | e945114b79482b59eae05ee692913aad792917b1 /libraries/base/Data/Foldable.hs | |
parent | a30187d530364a9cbfa1fdcbed465fa5eb2d53d9 (diff) | |
download | haskell-bfa9048daa170d0aec0601d1241dfa99bc8fd303.tar.gz |
Loads of doc(test)s
Diffstat (limited to 'libraries/base/Data/Foldable.hs')
-rw-r--r-- | libraries/base/Data/Foldable.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/Data/Foldable.hs b/libraries/base/Data/Foldable.hs index 1d9fc92ca5..e33d45efcf 100644 --- a/libraries/base/Data/Foldable.hs +++ b/libraries/base/Data/Foldable.hs @@ -506,6 +506,9 @@ sequence_ :: (Foldable t, Monad m) => t (m a) -> m () sequence_ = foldr (>>) (return ()) -- | The sum of a collection of actions, generalizing 'concat'. +-- +-- asum [Just "Hello", Nothing, Just "World"] +-- Just "Hello" asum :: (Foldable t, Alternative f) => t (f a) -> f a {-# INLINE asum #-} asum = foldr (<|>) empty |