{"action":"created","issue":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/22","labels_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/22/comments","events_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/22/events","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/issues/22","id":57350238,"number":22,"title":"Implement something like `drop`","user":{"login":"Gabriel439","id":1313787,"avatar_url":"https://avatars.githubusercontent.com/u/1313787?v=3","gravatar_id":"","url":"https://api.github.com/users/Gabriel439","html_url":"https://github.com/Gabriel439","followers_url":"https://api.github.com/users/Gabriel439/followers","following_url":"https://api.github.com/users/Gabriel439/following{/other_user}","gists_url":"https://api.github.com/users/Gabriel439/gists{/gist_id}","starred_url":"https://api.github.com/users/Gabriel439/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gabriel439/subscriptions","organizations_url":"https://api.github.com/users/Gabriel439/orgs","repos_url":"https://api.github.com/users/Gabriel439/repos","events_url":"https://api.github.com/users/Gabriel439/events{/privacy}","received_events_url":"https://api.github.com/users/Gabriel439/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-11T17:42:45Z","updated_at":"2015-02-11T18:11:27Z","closed_at":null,"body":"This is a reminder to myself to implement a function I mentioned on Stack Overflow:\r\n\r\nhttp://stackoverflow.com/questions/28421469/how-to-drop-lines-when-streaming-from-a-file-using-haskell-and-the-turtle-librar/28422201#28422201\r\n\r\nHere is the implementation:\r\n\r\n```haskell\r\nimport Data.IORef\r\nimport Turtle\r\n\r\ndrop :: Int -> Shell a -> Shell a\r\ndrop n s = Shell (\\(FoldM step begin done) -> do\r\n    ref <- newIORef 0\r\n    let step' x a = do\r\n            n' <- readIORef ref\r\n            writeIORef ref (n' + 1)\r\n            if n' < n then return x else step x a\r\n    foldIO s (FoldM step' begin done) )\r\n```"},"comment":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/comments/73932263","html_url":"https://github.com/Gabriel439/Haskell-Turtle-Library/issues/22#issuecomment-73932263","issue_url":"https://api.github.com/repos/Gabriel439/Haskell-Turtle-Library/issues/22","id":73932263,"user":{"login":"3noch","id":882455,"avatar_url":"https://avatars.githubusercontent.com/u/882455?v=3","gravatar_id":"","url":"https://api.github.com/users/3noch","html_url":"https://github.com/3noch","followers_url":"https://api.github.com/users/3noch/followers","following_url":"https://api.github.com/users/3noch/following{/other_user}","gists_url":"https://api.github.com/users/3noch/gists{/gist_id}","starred_url":"https://api.github.com/users/3noch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3noch/subscriptions","organizations_url":"https://api.github.com/users/3noch/orgs","repos_url":"https://api.github.com/users/3noch/repos","events_url":"https://api.github.com/users/3noch/events{/privacy}","received_events_url":"https://api.github.com/users/3noch/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T18:11:27Z","updated_at":"2015-02-11T18:11:27Z","body":"In that vein you might also want something like `tail`, no?"}}