{"action":"opened","issue":{"url":"https://api.github.com/repos/simonmar/async/issues/29","labels_url":"https://api.github.com/repos/simonmar/async/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/simonmar/async/issues/29/comments","events_url":"https://api.github.com/repos/simonmar/async/issues/29/events","html_url":"https://github.com/simonmar/async/issues/29","id":95035976,"number":29,"title":"forConcurrently","user":{"login":"dmjio","id":875324,"avatar_url":"https://avatars.githubusercontent.com/u/875324?v=3","gravatar_id":"","url":"https://api.github.com/users/dmjio","html_url":"https://github.com/dmjio","followers_url":"https://api.github.com/users/dmjio/followers","following_url":"https://api.github.com/users/dmjio/following{/other_user}","gists_url":"https://api.github.com/users/dmjio/gists{/gist_id}","starred_url":"https://api.github.com/users/dmjio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmjio/subscriptions","organizations_url":"https://api.github.com/users/dmjio/orgs","repos_url":"https://api.github.com/users/dmjio/repos","events_url":"https://api.github.com/users/dmjio/events{/privacy}","received_events_url":"https://api.github.com/users/dmjio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-14T20:44:18Z","updated_at":"2015-07-14T20:44:18Z","closed_at":null,"body":"This would be quite convenient.\r\n```haskell\r\nforConcurrently :: Traversable t => t a -> (a -> IO b) -> IO (t b)\r\nforConcurrently = flip mapConcurrently\r\n```\r\nand it's usage\r\n```haskell\r\nresult <- forConcurrently [1..num] $ \\x -> do\r\n   getItem\r\n```\r\nI find myself doing `flip mapConcurrently` a fair amount. Seems to fit in with `mapM` / `forM` pattern. What do you think?\r\n\r\nHere's an example usage of some code I'm using that would benefit.\r\n```haskell\r\n------------------------------------------------------------------------------                                                                                                    \r\n-- | User Feed Creation function                                                                                                                                                  \r\ncreateUserFeed :: [Feed] -> Vertigo [FeedJSON]                                                                                                                                    \r\ncreateUserFeed list =                                                                                                                                                             \r\n  flip mapConcurrently list $ \\Feed {..} -> do                                                                                                                                    \r\n    let ContentId uuid = feedId                                                                                                                                                   \r\n    case feedType of                                                                                                                                                              \r\n      FeedLike -> do                                                                                                                                                              \r\n        like :: Like <- dynamoGet $ getLikeItem (LikeId uuid)                                                                                                                     \r\n        return $ FeedJSON like feedSeqNum FeedLike                                                                                                                                \r\n      FeedFollow  -> do                                                                                                                                                           \r\n        let fo = Follow (FollowerId uuid) feedUserId                                                                                                                              \r\n        return $ FeedJSON fo feedSeqNum FeedFollow                                                                                                                                \r\n      FeedComment -> do                                                                                                                                                           \r\n        comment :: Comment <- dynamoGet $ getComment (CommentId uuid)                                                                                                             \r\n        return $ FeedJSON comment feedSeqNum FeedComment                                                                                                                          \r\n      FeedPost -> do                                                                                                                                                              \r\n        post :: Post <- dynamoGet $ getPost (PostId uuid)                                                                                                                         \r\n        return $ FeedJSON post feedSeqNum FeedPost                                                                                                                                \r\n```"}}