{"action":"created","comment":{"url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/comments/40158845","id":40158845,"diff_hunk":"@@ -39,29 +43,8 @@ object ListManipulationExercise02 {\n    * in a one-liner.\n    */\n   def separateTheYoungFromTheOld(persons: List[Person]): List[List[String]] = {\n-    var youngins: ListBuffer[Person] = new ListBuffer[Person]()\n-    var elders: ListBuffer[Person] = new ListBuffer[Person]()\n-    var validYoungNames: ListBuffer[String] = new ListBuffer[String]()\n-    var validOldNames: ListBuffer[String] = new ListBuffer[String]()\n-\n-    for (person <- persons) {\n-        if (person.age < 18) {\n-          youngins += person\n-        } else {\n-          elders += person\n-        }\n-    }\n-\n-    var sortedYoung = youngins.toList.sortBy(_.age)\n-    var sortedOld = elders.toList.sortBy(_.age)\n-\n-    for (young <- sortedYoung) {\n-      validYoungNames += young.firstName\n-    }\n-    for (old <- sortedOld) {\n-      validOldNames += old.firstName\n-    }\n-    List(validYoungNames.toList, validOldNames.toList)\n+    // This isn’t a very nice one-liner; it looks like there’s no way to got from (T, T) to List[T] nicely","path":"labs/src/main/scala/org/scalalabs/basic/lab02/ListManipulationExercise02.scala","position":58,"original_position":58,"commit_id":"fc1daa8ae9dccf323cdf568723eb561e8552ab3e","original_commit_id":"fc1daa8ae9dccf323cdf568723eb561e8552ab3e","user":{"login":"ZoabKapoor","id":7916986,"avatar_url":"https://avatars.githubusercontent.com/u/7916986?v=3","gravatar_id":"","url":"https://api.github.com/users/ZoabKapoor","html_url":"https://github.com/ZoabKapoor","followers_url":"https://api.github.com/users/ZoabKapoor/followers","following_url":"https://api.github.com/users/ZoabKapoor/following{/other_user}","gists_url":"https://api.github.com/users/ZoabKapoor/gists{/gist_id}","starred_url":"https://api.github.com/users/ZoabKapoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZoabKapoor/subscriptions","organizations_url":"https://api.github.com/users/ZoabKapoor/orgs","repos_url":"https://api.github.com/users/ZoabKapoor/repos","events_url":"https://api.github.com/users/ZoabKapoor/events{/privacy}","received_events_url":"https://api.github.com/users/ZoabKapoor/received_events","type":"User","site_admin":false},"body":"It could be worse - I couldn't figure out how to use both parts of the partition efficiently, so I just partitioned persons twice (once on age < 18 and one on age >= 18) and concatenated them to make the result list :stuck_out_tongue: ","created_at":"2015-09-22T23:47:48Z","updated_at":"2015-09-22T23:47:48Z","html_url":"https://github.com/hmc-cs111-fall2015/practice-scala/pull/12#discussion_r40158845","pull_request_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/comments/40158845"},"html":{"href":"https://github.com/hmc-cs111-fall2015/practice-scala/pull/12#discussion_r40158845"},"pull_request":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12","id":45519294,"html_url":"https://github.com/hmc-cs111-fall2015/practice-scala/pull/12","diff_url":"https://github.com/hmc-cs111-fall2015/practice-scala/pull/12.diff","patch_url":"https://github.com/hmc-cs111-fall2015/practice-scala/pull/12.patch","issue_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues/12","number":12,"state":"open","locked":false,"title":"Daniel Houck Submission","user":{"login":"dhouck","id":524925,"avatar_url":"https://avatars.githubusercontent.com/u/524925?v=3","gravatar_id":"","url":"https://api.github.com/users/dhouck","html_url":"https://github.com/dhouck","followers_url":"https://api.github.com/users/dhouck/followers","following_url":"https://api.github.com/users/dhouck/following{/other_user}","gists_url":"https://api.github.com/users/dhouck/gists{/gist_id}","starred_url":"https://api.github.com/users/dhouck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhouck/subscriptions","organizations_url":"https://api.github.com/users/dhouck/orgs","repos_url":"https://api.github.com/users/dhouck/repos","events_url":"https://api.github.com/users/dhouck/events{/privacy}","received_events_url":"https://api.github.com/users/dhouck/received_events","type":"User","site_admin":false},"body":"I’m running a bit late with this because it took literally several hours to get Java 8 installed and the default JVM on my computer and the rest of Scala installed, and I left this to the last minute so didn’t budget that into my time estimates.","created_at":"2015-09-21T07:12:50Z","updated_at":"2015-09-22T23:47:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4520b876e38e31798b04676292d3b53f9694220","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12/commits","review_comments_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12/comments","review_comment_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues/12/comments","statuses_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/statuses/fc1daa8ae9dccf323cdf568723eb561e8552ab3e","head":{"label":"DHouck-HMC-DSLs:master","ref":"master","sha":"fc1daa8ae9dccf323cdf568723eb561e8552ab3e","user":{"login":"DHouck-HMC-DSLs","id":14154825,"avatar_url":"https://avatars.githubusercontent.com/u/14154825?v=3","gravatar_id":"","url":"https://api.github.com/users/DHouck-HMC-DSLs","html_url":"https://github.com/DHouck-HMC-DSLs","followers_url":"https://api.github.com/users/DHouck-HMC-DSLs/followers","following_url":"https://api.github.com/users/DHouck-HMC-DSLs/following{/other_user}","gists_url":"https://api.github.com/users/DHouck-HMC-DSLs/gists{/gist_id}","starred_url":"https://api.github.com/users/DHouck-HMC-DSLs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DHouck-HMC-DSLs/subscriptions","organizations_url":"https://api.github.com/users/DHouck-HMC-DSLs/orgs","repos_url":"https://api.github.com/users/DHouck-HMC-DSLs/repos","events_url":"https://api.github.com/users/DHouck-HMC-DSLs/events{/privacy}","received_events_url":"https://api.github.com/users/DHouck-HMC-DSLs/received_events","type":"Organization","site_admin":false},"repo":{"id":42835342,"name":"practice-scala","full_name":"DHouck-HMC-DSLs/practice-scala","owner":{"login":"DHouck-HMC-DSLs","id":14154825,"avatar_url":"https://avatars.githubusercontent.com/u/14154825?v=3","gravatar_id":"","url":"https://api.github.com/users/DHouck-HMC-DSLs","html_url":"https://github.com/DHouck-HMC-DSLs","followers_url":"https://api.github.com/users/DHouck-HMC-DSLs/followers","following_url":"https://api.github.com/users/DHouck-HMC-DSLs/following{/other_user}","gists_url":"https://api.github.com/users/DHouck-HMC-DSLs/gists{/gist_id}","starred_url":"https://api.github.com/users/DHouck-HMC-DSLs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DHouck-HMC-DSLs/subscriptions","organizations_url":"https://api.github.com/users/DHouck-HMC-DSLs/orgs","repos_url":"https://api.github.com/users/DHouck-HMC-DSLs/repos","events_url":"https://api.github.com/users/DHouck-HMC-DSLs/events{/privacy}","received_events_url":"https://api.github.com/users/DHouck-HMC-DSLs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DHouck-HMC-DSLs/practice-scala","description":"","fork":true,"url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala","forks_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/forks","keys_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/teams","hooks_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/hooks","issue_events_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/issues/events{/number}","events_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/events","assignees_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/assignees{/user}","branches_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/branches{/branch}","tags_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/tags","blobs_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/statuses/{sha}","languages_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/languages","stargazers_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/stargazers","contributors_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/contributors","subscribers_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/subscribers","subscription_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/subscription","commits_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/contents/{+path}","compare_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/merges","archive_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/downloads","issues_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/issues{/number}","pulls_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/pulls{/number}","milestones_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/milestones{/number}","notifications_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/labels{/name}","releases_url":"https://api.github.com/repos/DHouck-HMC-DSLs/practice-scala/releases{/id}","created_at":"2015-09-21T00:31:13Z","updated_at":"2015-09-21T00:31:14Z","pushed_at":"2015-09-21T09:42:52Z","git_url":"git://github.com/DHouck-HMC-DSLs/practice-scala.git","ssh_url":"git@github.com:DHouck-HMC-DSLs/practice-scala.git","clone_url":"https://github.com/DHouck-HMC-DSLs/practice-scala.git","svn_url":"https://github.com/DHouck-HMC-DSLs/practice-scala","homepage":null,"size":4580,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"hmc-cs111-fall2015:master","ref":"master","sha":"1072f2359817a99f56ca8c798e03026c739e022f","user":{"login":"hmc-cs111-fall2015","id":12563789,"avatar_url":"https://avatars.githubusercontent.com/u/12563789?v=3","gravatar_id":"","url":"https://api.github.com/users/hmc-cs111-fall2015","html_url":"https://github.com/hmc-cs111-fall2015","followers_url":"https://api.github.com/users/hmc-cs111-fall2015/followers","following_url":"https://api.github.com/users/hmc-cs111-fall2015/following{/other_user}","gists_url":"https://api.github.com/users/hmc-cs111-fall2015/gists{/gist_id}","starred_url":"https://api.github.com/users/hmc-cs111-fall2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmc-cs111-fall2015/subscriptions","organizations_url":"https://api.github.com/users/hmc-cs111-fall2015/orgs","repos_url":"https://api.github.com/users/hmc-cs111-fall2015/repos","events_url":"https://api.github.com/users/hmc-cs111-fall2015/events{/privacy}","received_events_url":"https://api.github.com/users/hmc-cs111-fall2015/received_events","type":"Organization","site_admin":false},"repo":{"id":42567697,"name":"practice-scala","full_name":"hmc-cs111-fall2015/practice-scala","owner":{"login":"hmc-cs111-fall2015","id":12563789,"avatar_url":"https://avatars.githubusercontent.com/u/12563789?v=3","gravatar_id":"","url":"https://api.github.com/users/hmc-cs111-fall2015","html_url":"https://github.com/hmc-cs111-fall2015","followers_url":"https://api.github.com/users/hmc-cs111-fall2015/followers","following_url":"https://api.github.com/users/hmc-cs111-fall2015/following{/other_user}","gists_url":"https://api.github.com/users/hmc-cs111-fall2015/gists{/gist_id}","starred_url":"https://api.github.com/users/hmc-cs111-fall2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmc-cs111-fall2015/subscriptions","organizations_url":"https://api.github.com/users/hmc-cs111-fall2015/orgs","repos_url":"https://api.github.com/users/hmc-cs111-fall2015/repos","events_url":"https://api.github.com/users/hmc-cs111-fall2015/events{/privacy}","received_events_url":"https://api.github.com/users/hmc-cs111-fall2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmc-cs111-fall2015/practice-scala","description":"","fork":true,"url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala","forks_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/forks","keys_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/teams","hooks_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/hooks","issue_events_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues/events{/number}","events_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/events","assignees_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/assignees{/user}","branches_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/branches{/branch}","tags_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/tags","blobs_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/statuses/{sha}","languages_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/languages","stargazers_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/stargazers","contributors_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/contributors","subscribers_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/subscribers","subscription_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/subscription","commits_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/contents/{+path}","compare_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/merges","archive_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/downloads","issues_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues{/number}","pulls_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls{/number}","milestones_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/milestones{/number}","notifications_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/labels{/name}","releases_url":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/releases{/id}","created_at":"2015-09-16T05:58:43Z","updated_at":"2015-09-16T05:58:45Z","pushed_at":"2015-09-22T10:32:04Z","git_url":"git://github.com/hmc-cs111-fall2015/practice-scala.git","ssh_url":"git@github.com:hmc-cs111-fall2015/practice-scala.git","clone_url":"https://github.com/hmc-cs111-fall2015/practice-scala.git","svn_url":"https://github.com/hmc-cs111-fall2015/practice-scala","homepage":null,"size":5227,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":12,"forks":12,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12"},"html":{"href":"https://github.com/hmc-cs111-fall2015/practice-scala/pull/12"},"issue":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues/12"},"comments":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/hmc-cs111-fall2015/practice-scala/statuses/fc1daa8ae9dccf323cdf568723eb561e8552ab3e"}}}}