-- * List

-- | Monadic iteration over a list, with indexes
indexedForM :: Monad m => [a] -> ((a, Int) -> m b) -> m [b]
indexedForM xs =
    forM $ zip xs (iterate (+1) 0)
indexedForM :: Monad m => [a] -> ((a, Int) -> m b) -> m [b]
indexedForM xs =
    forM $ zip xs (iterate (+1) 0)
indexedForM xs =
    forM $ zip xs (iterate (+1) 0)