Added another helper function, seqPair, to the Utils module
This commit is contained in:
parent
8f96af8bb8
commit
47f5e36f9c
|
@ -123,3 +123,9 @@ applyAll x = map (\f -> f x)
|
|||
-- | Like concat applied after mapM (or the monadic version of concatMap).
|
||||
concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]
|
||||
concatMapM f x = mapM f x >>* concat
|
||||
|
||||
-- | Like the monadic sequence function, but for pairs instead of lists.
|
||||
seqPair :: Monad m => (m a, m b) -> m (a,b)
|
||||
seqPair (x,y) = do x' <- x
|
||||
y' <- y
|
||||
return (x',y')
|
||||
|
|
Loading…
Reference in New Issue
Block a user