{"action":"created","comment":{"url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/comments/95104788","pull_request_review_id":15648706,"id":95104788,"diff_hunk":"@@ -24,7 +24,7 @@ func matrix_chain_order(dimensions: [Int]) -> (multiplications: [[Int]], splits:\n             // try every possible index for splitting the chain\n             for mid in left...right-1 {\n                 // new possible minimum = number of multiplications needed to get to this point\n-                var x : Int = multiplications[left][mid] + multiplications[mid + 1][right]\n+                var x = multiplications[left][mid] + multiplications[mid + 1][right]","path":"matrix_chain_order/matrix_chain_order_swift/matrix_chain_order_swift/main.swift","position":14,"original_position":14,"commit_id":"aaf05783417f64c9da5ae293e080e4a1716b0b39","original_commit_id":"aaf05783417f64c9da5ae293e080e4a1716b0b39","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"body":"Re: cleaner `init`. There's a couple options. \r\n\r\nOne is using something like this lightweight [Matrix](https://github.com/dn-m/Collections/blob/master/Collections/Matrix.swift) implementation.","created_at":"2017-01-09T05:57:32Z","updated_at":"2017-01-09T05:57:32Z","html_url":"https://github.com/brianlheim/Data-Structures-Algorithms/pull/1#discussion_r95104788","pull_request_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/comments/95104788"},"html":{"href":"https://github.com/brianlheim/Data-Structures-Algorithms/pull/1#discussion_r95104788"},"pull_request":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1","id":100628293,"html_url":"https://github.com/brianlheim/Data-Structures-Algorithms/pull/1","diff_url":"https://github.com/brianlheim/Data-Structures-Algorithms/pull/1.diff","patch_url":"https://github.com/brianlheim/Data-Structures-Algorithms/pull/1.patch","issue_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues/1","number":1,"state":"open","locked":false,"title":"Swifting around","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"body":"- Made very minor idiomatic Swift changes to actual algorithm\r\n- Made a nice little 2D array formatter to show:\r\n    - generics (`<T>`)\r\n    - `map`\r\n    - `flatMap` (2 types)\r\n    - nil coalescing operator (`??`)\r\n    - argument-label-less `func` signatures\r\n   - `guard`\r\n   - default parameter values\r\n  ","created_at":"2017-01-09T02:47:17Z","updated_at":"2017-01-09T05:57:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77c949d370028d2aa3413ca30d0ffd27ce1d0ad4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1/commits","review_comments_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1/comments","review_comment_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues/1/comments","statuses_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/statuses/aaf05783417f64c9da5ae293e080e4a1716b0b39","head":{"label":"jsbean:screwing-around","ref":"screwing-around","sha":"aaf05783417f64c9da5ae293e080e4a1716b0b39","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"repo":{"id":78381026,"name":"Data-Structures-Algorithms","full_name":"jsbean/Data-Structures-Algorithms","owner":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsbean/Data-Structures-Algorithms","description":"sundry data structures and algorithms from faraway lands","fork":true,"url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms","forks_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/forks","keys_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/teams","hooks_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/hooks","issue_events_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/events","assignees_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/tags","blobs_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/languages","stargazers_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/stargazers","contributors_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/contributors","subscribers_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/subscribers","subscription_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/subscription","commits_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/merges","archive_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/downloads","issues_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/labels{/name}","releases_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/jsbean/Data-Structures-Algorithms/deployments","created_at":"2017-01-09T00:52:16Z","updated_at":"2017-01-09T00:52:17Z","pushed_at":"2017-01-09T02:40:21Z","git_url":"git://github.com/jsbean/Data-Structures-Algorithms.git","ssh_url":"git@github.com:jsbean/Data-Structures-Algorithms.git","clone_url":"https://github.com/jsbean/Data-Structures-Algorithms.git","svn_url":"https://github.com/jsbean/Data-Structures-Algorithms","homepage":null,"size":77,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"brianlheim:master","ref":"master","sha":"6099056e2ac02b30c38c8155701530912dafdb0a","user":{"login":"brianlheim","id":15369640,"avatar_url":"https://avatars.githubusercontent.com/u/15369640?v=3","gravatar_id":"","url":"https://api.github.com/users/brianlheim","html_url":"https://github.com/brianlheim","followers_url":"https://api.github.com/users/brianlheim/followers","following_url":"https://api.github.com/users/brianlheim/following{/other_user}","gists_url":"https://api.github.com/users/brianlheim/gists{/gist_id}","starred_url":"https://api.github.com/users/brianlheim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianlheim/subscriptions","organizations_url":"https://api.github.com/users/brianlheim/orgs","repos_url":"https://api.github.com/users/brianlheim/repos","events_url":"https://api.github.com/users/brianlheim/events{/privacy}","received_events_url":"https://api.github.com/users/brianlheim/received_events","type":"User","site_admin":false},"repo":{"id":77397985,"name":"Data-Structures-Algorithms","full_name":"brianlheim/Data-Structures-Algorithms","owner":{"login":"brianlheim","id":15369640,"avatar_url":"https://avatars.githubusercontent.com/u/15369640?v=3","gravatar_id":"","url":"https://api.github.com/users/brianlheim","html_url":"https://github.com/brianlheim","followers_url":"https://api.github.com/users/brianlheim/followers","following_url":"https://api.github.com/users/brianlheim/following{/other_user}","gists_url":"https://api.github.com/users/brianlheim/gists{/gist_id}","starred_url":"https://api.github.com/users/brianlheim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianlheim/subscriptions","organizations_url":"https://api.github.com/users/brianlheim/orgs","repos_url":"https://api.github.com/users/brianlheim/repos","events_url":"https://api.github.com/users/brianlheim/events{/privacy}","received_events_url":"https://api.github.com/users/brianlheim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianlheim/Data-Structures-Algorithms","description":"sundry data structures and algorithms from faraway lands","fork":false,"url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms","forks_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/forks","keys_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/teams","hooks_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/hooks","issue_events_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/events","assignees_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/tags","blobs_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/languages","stargazers_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/stargazers","contributors_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/contributors","subscribers_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/subscribers","subscription_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/subscription","commits_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/merges","archive_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/downloads","issues_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/labels{/name}","releases_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/deployments","created_at":"2016-12-26T17:32:38Z","updated_at":"2016-12-26T20:06:29Z","pushed_at":"2017-01-09T02:47:17Z","git_url":"git://github.com/brianlheim/Data-Structures-Algorithms.git","ssh_url":"git@github.com:brianlheim/Data-Structures-Algorithms.git","clone_url":"https://github.com/brianlheim/Data-Structures-Algorithms.git","svn_url":"https://github.com/brianlheim/Data-Structures-Algorithms","homepage":null,"size":70,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1"},"html":{"href":"https://github.com/brianlheim/Data-Structures-Algorithms/pull/1"},"issue":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues/1"},"comments":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/brianlheim/Data-Structures-Algorithms/statuses/aaf05783417f64c9da5ae293e080e4a1716b0b39"}}}}
{"actor":{"display_login":"jsbean"}}