{"action":"created","comment":{"url":"https://api.github.com/repos/hyperoslo/Sugar/pulls/comments/40802395","id":40802395,"diff_hunk":"@@ -0,0 +1,17 @@\n+public protocol Queueable {\n+  func process() -> Bool\n+}\n+\n+public extension Array where Element : Queueable {\n+\n+  public mutating func processQueue(from: Int = 0, _ to: Int? = nil, process: ((object: Element) -> Void)? = nil) {\n+    let to = to != nil ? to! : count\n+    let currentQueue = self[from..<to]\n+    for (index, queuable) in currentQueue.enumerate() {\n+      if queuable.process() == true {\n+        process?(object: queuable)\n+        removeAtIndex(index - (currentQueue.count - self.count))","path":"Source/Extensions/Array+Queueable.swift","position":null,"original_position":13,"commit_id":"2317d03fa507e769bde89a7f4ec9236ae1651a4a","original_commit_id":"48def7bae83581befc201b05cb9979f79b6f179f","user":{"login":"zenangst","id":57446,"avatar_url":"https://avatars.githubusercontent.com/u/57446?v=3","gravatar_id":"","url":"https://api.github.com/users/zenangst","html_url":"https://github.com/zenangst","followers_url":"https://api.github.com/users/zenangst/followers","following_url":"https://api.github.com/users/zenangst/following{/other_user}","gists_url":"https://api.github.com/users/zenangst/gists{/gist_id}","starred_url":"https://api.github.com/users/zenangst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenangst/subscriptions","organizations_url":"https://api.github.com/users/zenangst/orgs","repos_url":"https://api.github.com/users/zenangst/repos","events_url":"https://api.github.com/users/zenangst/events{/privacy}","received_events_url":"https://api.github.com/users/zenangst/received_events","type":"User","site_admin":false},"body":"Fixed!","created_at":"2015-09-30T14:44:44Z","updated_at":"2015-09-30T14:44:44Z","html_url":"https://github.com/hyperoslo/Sugar/pull/10#discussion_r40802395","pull_request_url":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/hyperoslo/Sugar/pulls/comments/40802395"},"html":{"href":"https://github.com/hyperoslo/Sugar/pull/10#discussion_r40802395"},"pull_request":{"href":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10","id":46406713,"html_url":"https://github.com/hyperoslo/Sugar/pull/10","diff_url":"https://github.com/hyperoslo/Sugar/pull/10.diff","patch_url":"https://github.com/hyperoslo/Sugar/pull/10.patch","issue_url":"https://api.github.com/repos/hyperoslo/Sugar/issues/10","number":10,"state":"open","locked":false,"title":"Feature Arrays with Queueable objects","user":{"login":"zenangst","id":57446,"avatar_url":"https://avatars.githubusercontent.com/u/57446?v=3","gravatar_id":"","url":"https://api.github.com/users/zenangst","html_url":"https://github.com/zenangst","followers_url":"https://api.github.com/users/zenangst/followers","following_url":"https://api.github.com/users/zenangst/following{/other_user}","gists_url":"https://api.github.com/users/zenangst/gists{/gist_id}","starred_url":"https://api.github.com/users/zenangst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenangst/subscriptions","organizations_url":"https://api.github.com/users/zenangst/orgs","repos_url":"https://api.github.com/users/zenangst/repos","events_url":"https://api.github.com/users/zenangst/events{/privacy}","received_events_url":"https://api.github.com/users/zenangst/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-09-30T14:12:52Z","updated_at":"2015-09-30T14:44:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b091ca3ed982e9b4a579b687a960bac3b9ae137","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10/commits","review_comments_url":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10/comments","review_comment_url":"https://api.github.com/repos/hyperoslo/Sugar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperoslo/Sugar/issues/10/comments","statuses_url":"https://api.github.com/repos/hyperoslo/Sugar/statuses/2317d03fa507e769bde89a7f4ec9236ae1651a4a","head":{"label":"hyperoslo:feature/queueable","ref":"feature/queueable","sha":"2317d03fa507e769bde89a7f4ec9236ae1651a4a","user":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"repo":{"id":38810470,"name":"Sugar","full_name":"hyperoslo/Sugar","owner":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperoslo/Sugar","description":"Something sweet","fork":false,"url":"https://api.github.com/repos/hyperoslo/Sugar","forks_url":"https://api.github.com/repos/hyperoslo/Sugar/forks","keys_url":"https://api.github.com/repos/hyperoslo/Sugar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperoslo/Sugar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperoslo/Sugar/teams","hooks_url":"https://api.github.com/repos/hyperoslo/Sugar/hooks","issue_events_url":"https://api.github.com/repos/hyperoslo/Sugar/issues/events{/number}","events_url":"https://api.github.com/repos/hyperoslo/Sugar/events","assignees_url":"https://api.github.com/repos/hyperoslo/Sugar/assignees{/user}","branches_url":"https://api.github.com/repos/hyperoslo/Sugar/branches{/branch}","tags_url":"https://api.github.com/repos/hyperoslo/Sugar/tags","blobs_url":"https://api.github.com/repos/hyperoslo/Sugar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperoslo/Sugar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperoslo/Sugar/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperoslo/Sugar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperoslo/Sugar/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperoslo/Sugar/languages","stargazers_url":"https://api.github.com/repos/hyperoslo/Sugar/stargazers","contributors_url":"https://api.github.com/repos/hyperoslo/Sugar/contributors","subscribers_url":"https://api.github.com/repos/hyperoslo/Sugar/subscribers","subscription_url":"https://api.github.com/repos/hyperoslo/Sugar/subscription","commits_url":"https://api.github.com/repos/hyperoslo/Sugar/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperoslo/Sugar/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperoslo/Sugar/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperoslo/Sugar/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperoslo/Sugar/contents/{+path}","compare_url":"https://api.github.com/repos/hyperoslo/Sugar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperoslo/Sugar/merges","archive_url":"https://api.github.com/repos/hyperoslo/Sugar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperoslo/Sugar/downloads","issues_url":"https://api.github.com/repos/hyperoslo/Sugar/issues{/number}","pulls_url":"https://api.github.com/repos/hyperoslo/Sugar/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperoslo/Sugar/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperoslo/Sugar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperoslo/Sugar/labels{/name}","releases_url":"https://api.github.com/repos/hyperoslo/Sugar/releases{/id}","created_at":"2015-07-09T09:10:55Z","updated_at":"2015-09-30T14:26:20Z","pushed_at":"2015-09-30T14:44:04Z","git_url":"git://github.com/hyperoslo/Sugar.git","ssh_url":"git@github.com:hyperoslo/Sugar.git","clone_url":"https://github.com/hyperoslo/Sugar.git","svn_url":"https://github.com/hyperoslo/Sugar","homepage":null,"size":239,"stargazers_count":2,"watchers_count":2,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"hyperoslo:master","ref":"master","sha":"ae13b0dd68fd91e17cdff8947d8702b9026b6830","user":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"repo":{"id":38810470,"name":"Sugar","full_name":"hyperoslo/Sugar","owner":{"login":"hyperoslo","id":1340892,"avatar_url":"https://avatars.githubusercontent.com/u/1340892?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperoslo","html_url":"https://github.com/hyperoslo","followers_url":"https://api.github.com/users/hyperoslo/followers","following_url":"https://api.github.com/users/hyperoslo/following{/other_user}","gists_url":"https://api.github.com/users/hyperoslo/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperoslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperoslo/subscriptions","organizations_url":"https://api.github.com/users/hyperoslo/orgs","repos_url":"https://api.github.com/users/hyperoslo/repos","events_url":"https://api.github.com/users/hyperoslo/events{/privacy}","received_events_url":"https://api.github.com/users/hyperoslo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperoslo/Sugar","description":"Something sweet","fork":false,"url":"https://api.github.com/repos/hyperoslo/Sugar","forks_url":"https://api.github.com/repos/hyperoslo/Sugar/forks","keys_url":"https://api.github.com/repos/hyperoslo/Sugar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperoslo/Sugar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperoslo/Sugar/teams","hooks_url":"https://api.github.com/repos/hyperoslo/Sugar/hooks","issue_events_url":"https://api.github.com/repos/hyperoslo/Sugar/issues/events{/number}","events_url":"https://api.github.com/repos/hyperoslo/Sugar/events","assignees_url":"https://api.github.com/repos/hyperoslo/Sugar/assignees{/user}","branches_url":"https://api.github.com/repos/hyperoslo/Sugar/branches{/branch}","tags_url":"https://api.github.com/repos/hyperoslo/Sugar/tags","blobs_url":"https://api.github.com/repos/hyperoslo/Sugar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperoslo/Sugar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperoslo/Sugar/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperoslo/Sugar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperoslo/Sugar/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperoslo/Sugar/languages","stargazers_url":"https://api.github.com/repos/hyperoslo/Sugar/stargazers","contributors_url":"https://api.github.com/repos/hyperoslo/Sugar/contributors","subscribers_url":"https://api.github.com/repos/hyperoslo/Sugar/subscribers","subscription_url":"https://api.github.com/repos/hyperoslo/Sugar/subscription","commits_url":"https://api.github.com/repos/hyperoslo/Sugar/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperoslo/Sugar/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperoslo/Sugar/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperoslo/Sugar/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperoslo/Sugar/contents/{+path}","compare_url":"https://api.github.com/repos/hyperoslo/Sugar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperoslo/Sugar/merges","archive_url":"https://api.github.com/repos/hyperoslo/Sugar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperoslo/Sugar/downloads","issues_url":"https://api.github.com/repos/hyperoslo/Sugar/issues{/number}","pulls_url":"https://api.github.com/repos/hyperoslo/Sugar/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperoslo/Sugar/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperoslo/Sugar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperoslo/Sugar/labels{/name}","releases_url":"https://api.github.com/repos/hyperoslo/Sugar/releases{/id}","created_at":"2015-07-09T09:10:55Z","updated_at":"2015-09-30T14:26:20Z","pushed_at":"2015-09-30T14:44:04Z","git_url":"git://github.com/hyperoslo/Sugar.git","ssh_url":"git@github.com:hyperoslo/Sugar.git","clone_url":"https://github.com/hyperoslo/Sugar.git","svn_url":"https://github.com/hyperoslo/Sugar","homepage":null,"size":239,"stargazers_count":2,"watchers_count":2,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10"},"html":{"href":"https://github.com/hyperoslo/Sugar/pull/10"},"issue":{"href":"https://api.github.com/repos/hyperoslo/Sugar/issues/10"},"comments":{"href":"https://api.github.com/repos/hyperoslo/Sugar/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperoslo/Sugar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperoslo/Sugar/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/hyperoslo/Sugar/statuses/2317d03fa507e769bde89a7f4ec9236ae1651a4a"}}}}