mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-24 17:44:21 +03:00
Add TODO for tests in Util.Control.Monad
This commit is contained in:
parent
96450aa31d
commit
a65a964b76
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user