Add TODO for tests in Util.Control.Monad

This commit is contained in:
craigmc08 2021-08-05 13:04:19 -04:00 committed by Craig McIlwrath
parent 96450aa31d
commit a65a964b76

View File

@ -11,6 +11,8 @@ import Data.List.NonEmpty (NonEmpty ((:|)))
-- | Analogous to "Data.Foldable.foldMap'", except that its result is encapsulated in a
-- monad.
--
-- TODO: write tests for this function
--
-- @
-- foldMapM f [x1, x2, ..., xn] ==
-- do
@ -32,6 +34,8 @@ foldMapM' f = foldl' (\ms a -> ms >>= \s -> (s <>) <$> f a) $ pure mempty
-- | A variant of "Control.Monad.foldM" that has no base case and can only be
-- applied to a non empty list.
--
-- TODO: write tests for this function
--
-- __Examples__
--
-- >>> foldM1 (\l r -> Right $ l + r) $ 1 :| [2..4]