{"action":"created","comment":{"url":"https://api.github.com/repos/javaslang/javaslang/pulls/comments/58017974","id":58017974,"diff_hunk":"@@ -980,6 +980,17 @@ default int length() {\n     }\n \n     @Override\n+    default Stream<T> leftPadTo(int length, T element) {\n+        if (length <= 1) {","path":"javaslang/src/main/java/javaslang/collection/Stream.java","position":5,"original_position":5,"commit_id":"221ad070bb6e21d94b8ac578619cd1ec423c47d5","original_commit_id":"221ad070bb6e21d94b8ac578619cd1ec423c47d5","user":{"login":"nicholasren","id":1003116,"avatar_url":"https://avatars.githubusercontent.com/u/1003116?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholasren","html_url":"https://github.com/nicholasren","followers_url":"https://api.github.com/users/nicholasren/followers","following_url":"https://api.github.com/users/nicholasren/following{/other_user}","gists_url":"https://api.github.com/users/nicholasren/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholasren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholasren/subscriptions","organizations_url":"https://api.github.com/users/nicholasren/orgs","repos_url":"https://api.github.com/users/nicholasren/repos","events_url":"https://api.github.com/users/nicholasren/events{/privacy}","received_events_url":"https://api.github.com/users/nicholasren/received_events","type":"User","site_admin":false},"body":"I was trying to avoid using `length()` on Stream as `Stream` is an _lazy_ collection, while calling `length()` on a `Stream` object will trigger a full evaluation.\r\n\r\nBut looks like both `padTo` and `leftPadTo` have to full evaluate the whole stream any  way, you solution works pretty well.\r\n\r\nShall we make it explicit that these methods should be carefully used on `Stream`?","created_at":"2016-03-31T08:38:37Z","updated_at":"2016-03-31T08:38:37Z","html_url":"https://github.com/javaslang/javaslang/pull/1245#discussion_r58017974","pull_request_url":"https://api.github.com/repos/javaslang/javaslang/pulls/1245","_links":{"self":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/comments/58017974"},"html":{"href":"https://github.com/javaslang/javaslang/pull/1245#discussion_r58017974"},"pull_request":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1245"}}},"pull_request":{"url":"https://api.github.com/repos/javaslang/javaslang/pulls/1245","id":64606378,"html_url":"https://github.com/javaslang/javaslang/pull/1245","diff_url":"https://github.com/javaslang/javaslang/pull/1245.diff","patch_url":"https://github.com/javaslang/javaslang/pull/1245.patch","issue_url":"https://api.github.com/repos/javaslang/javaslang/issues/1245","number":1245,"state":"open","locked":false,"title":"issue-1238: Add leftPadTo(int, T) to Seq.","user":{"login":"nicholasren","id":1003116,"avatar_url":"https://avatars.githubusercontent.com/u/1003116?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholasren","html_url":"https://github.com/nicholasren","followers_url":"https://api.github.com/users/nicholasren/followers","following_url":"https://api.github.com/users/nicholasren/following{/other_user}","gists_url":"https://api.github.com/users/nicholasren/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholasren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholasren/subscriptions","organizations_url":"https://api.github.com/users/nicholasren/orgs","repos_url":"https://api.github.com/users/nicholasren/repos","events_url":"https://api.github.com/users/nicholasren/events{/privacy}","received_events_url":"https://api.github.com/users/nicholasren/received_events","type":"User","site_admin":false},"body":"Hi Daniel, \r\n\r\nI implemented the `leftPadTo(int, T)` for `Seq` which is mentioned in [issue 1238](https://github.com/javaslang/javaslang/issues/1238). please help to review it and merge.\r\n\r\nThanks","created_at":"2016-03-30T10:45:00Z","updated_at":"2016-03-31T08:38:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"995090b66b5af284bfc3daf5ab718104685855de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/javaslang/javaslang/pulls/1245/commits","review_comments_url":"https://api.github.com/repos/javaslang/javaslang/pulls/1245/comments","review_comment_url":"https://api.github.com/repos/javaslang/javaslang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javaslang/javaslang/issues/1245/comments","statuses_url":"https://api.github.com/repos/javaslang/javaslang/statuses/221ad070bb6e21d94b8ac578619cd1ec423c47d5","head":{"label":"nicholasren:master","ref":"master","sha":"221ad070bb6e21d94b8ac578619cd1ec423c47d5","user":{"login":"nicholasren","id":1003116,"avatar_url":"https://avatars.githubusercontent.com/u/1003116?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholasren","html_url":"https://github.com/nicholasren","followers_url":"https://api.github.com/users/nicholasren/followers","following_url":"https://api.github.com/users/nicholasren/following{/other_user}","gists_url":"https://api.github.com/users/nicholasren/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholasren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholasren/subscriptions","organizations_url":"https://api.github.com/users/nicholasren/orgs","repos_url":"https://api.github.com/users/nicholasren/repos","events_url":"https://api.github.com/users/nicholasren/events{/privacy}","received_events_url":"https://api.github.com/users/nicholasren/received_events","type":"User","site_admin":false},"repo":{"id":55053967,"name":"javaslang","full_name":"nicholasren/javaslang","owner":{"login":"nicholasren","id":1003116,"avatar_url":"https://avatars.githubusercontent.com/u/1003116?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholasren","html_url":"https://github.com/nicholasren","followers_url":"https://api.github.com/users/nicholasren/followers","following_url":"https://api.github.com/users/nicholasren/following{/other_user}","gists_url":"https://api.github.com/users/nicholasren/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholasren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholasren/subscriptions","organizations_url":"https://api.github.com/users/nicholasren/orgs","repos_url":"https://api.github.com/users/nicholasren/repos","events_url":"https://api.github.com/users/nicholasren/events{/privacy}","received_events_url":"https://api.github.com/users/nicholasren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicholasren/javaslang","description":"A functional library for Java 8+ that provides persistent data types and functional control structures.","fork":true,"url":"https://api.github.com/repos/nicholasren/javaslang","forks_url":"https://api.github.com/repos/nicholasren/javaslang/forks","keys_url":"https://api.github.com/repos/nicholasren/javaslang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicholasren/javaslang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicholasren/javaslang/teams","hooks_url":"https://api.github.com/repos/nicholasren/javaslang/hooks","issue_events_url":"https://api.github.com/repos/nicholasren/javaslang/issues/events{/number}","events_url":"https://api.github.com/repos/nicholasren/javaslang/events","assignees_url":"https://api.github.com/repos/nicholasren/javaslang/assignees{/user}","branches_url":"https://api.github.com/repos/nicholasren/javaslang/branches{/branch}","tags_url":"https://api.github.com/repos/nicholasren/javaslang/tags","blobs_url":"https://api.github.com/repos/nicholasren/javaslang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicholasren/javaslang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicholasren/javaslang/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicholasren/javaslang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicholasren/javaslang/statuses/{sha}","languages_url":"https://api.github.com/repos/nicholasren/javaslang/languages","stargazers_url":"https://api.github.com/repos/nicholasren/javaslang/stargazers","contributors_url":"https://api.github.com/repos/nicholasren/javaslang/contributors","subscribers_url":"https://api.github.com/repos/nicholasren/javaslang/subscribers","subscription_url":"https://api.github.com/repos/nicholasren/javaslang/subscription","commits_url":"https://api.github.com/repos/nicholasren/javaslang/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicholasren/javaslang/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicholasren/javaslang/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicholasren/javaslang/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicholasren/javaslang/contents/{+path}","compare_url":"https://api.github.com/repos/nicholasren/javaslang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicholasren/javaslang/merges","archive_url":"https://api.github.com/repos/nicholasren/javaslang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicholasren/javaslang/downloads","issues_url":"https://api.github.com/repos/nicholasren/javaslang/issues{/number}","pulls_url":"https://api.github.com/repos/nicholasren/javaslang/pulls{/number}","milestones_url":"https://api.github.com/repos/nicholasren/javaslang/milestones{/number}","notifications_url":"https://api.github.com/repos/nicholasren/javaslang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicholasren/javaslang/labels{/name}","releases_url":"https://api.github.com/repos/nicholasren/javaslang/releases{/id}","deployments_url":"https://api.github.com/repos/nicholasren/javaslang/deployments","created_at":"2016-03-30T10:24:04Z","updated_at":"2016-03-30T10:24:06Z","pushed_at":"2016-03-30T11:02:02Z","git_url":"git://github.com/nicholasren/javaslang.git","ssh_url":"git@github.com:nicholasren/javaslang.git","clone_url":"https://github.com/nicholasren/javaslang.git","svn_url":"https://github.com/nicholasren/javaslang","homepage":"http://javaslang.io","size":10521,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"javaslang:master","ref":"master","sha":"30f89f1126257ba48d63b2848c4ae46bb89e2b7c","user":{"login":"javaslang","id":5786132,"avatar_url":"https://avatars.githubusercontent.com/u/5786132?v=3","gravatar_id":"","url":"https://api.github.com/users/javaslang","html_url":"https://github.com/javaslang","followers_url":"https://api.github.com/users/javaslang/followers","following_url":"https://api.github.com/users/javaslang/following{/other_user}","gists_url":"https://api.github.com/users/javaslang/gists{/gist_id}","starred_url":"https://api.github.com/users/javaslang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaslang/subscriptions","organizations_url":"https://api.github.com/users/javaslang/orgs","repos_url":"https://api.github.com/users/javaslang/repos","events_url":"https://api.github.com/users/javaslang/events{/privacy}","received_events_url":"https://api.github.com/users/javaslang/received_events","type":"Organization","site_admin":false},"repo":{"id":16378879,"name":"javaslang","full_name":"javaslang/javaslang","owner":{"login":"javaslang","id":5786132,"avatar_url":"https://avatars.githubusercontent.com/u/5786132?v=3","gravatar_id":"","url":"https://api.github.com/users/javaslang","html_url":"https://github.com/javaslang","followers_url":"https://api.github.com/users/javaslang/followers","following_url":"https://api.github.com/users/javaslang/following{/other_user}","gists_url":"https://api.github.com/users/javaslang/gists{/gist_id}","starred_url":"https://api.github.com/users/javaslang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaslang/subscriptions","organizations_url":"https://api.github.com/users/javaslang/orgs","repos_url":"https://api.github.com/users/javaslang/repos","events_url":"https://api.github.com/users/javaslang/events{/privacy}","received_events_url":"https://api.github.com/users/javaslang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/javaslang/javaslang","description":"A functional library for Java 8+ that provides persistent data types and functional control structures.","fork":false,"url":"https://api.github.com/repos/javaslang/javaslang","forks_url":"https://api.github.com/repos/javaslang/javaslang/forks","keys_url":"https://api.github.com/repos/javaslang/javaslang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javaslang/javaslang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javaslang/javaslang/teams","hooks_url":"https://api.github.com/repos/javaslang/javaslang/hooks","issue_events_url":"https://api.github.com/repos/javaslang/javaslang/issues/events{/number}","events_url":"https://api.github.com/repos/javaslang/javaslang/events","assignees_url":"https://api.github.com/repos/javaslang/javaslang/assignees{/user}","branches_url":"https://api.github.com/repos/javaslang/javaslang/branches{/branch}","tags_url":"https://api.github.com/repos/javaslang/javaslang/tags","blobs_url":"https://api.github.com/repos/javaslang/javaslang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javaslang/javaslang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javaslang/javaslang/git/refs{/sha}","trees_url":"https://api.github.com/repos/javaslang/javaslang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javaslang/javaslang/statuses/{sha}","languages_url":"https://api.github.com/repos/javaslang/javaslang/languages","stargazers_url":"https://api.github.com/repos/javaslang/javaslang/stargazers","contributors_url":"https://api.github.com/repos/javaslang/javaslang/contributors","subscribers_url":"https://api.github.com/repos/javaslang/javaslang/subscribers","subscription_url":"https://api.github.com/repos/javaslang/javaslang/subscription","commits_url":"https://api.github.com/repos/javaslang/javaslang/commits{/sha}","git_commits_url":"https://api.github.com/repos/javaslang/javaslang/git/commits{/sha}","comments_url":"https://api.github.com/repos/javaslang/javaslang/comments{/number}","issue_comment_url":"https://api.github.com/repos/javaslang/javaslang/issues/comments{/number}","contents_url":"https://api.github.com/repos/javaslang/javaslang/contents/{+path}","compare_url":"https://api.github.com/repos/javaslang/javaslang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javaslang/javaslang/merges","archive_url":"https://api.github.com/repos/javaslang/javaslang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javaslang/javaslang/downloads","issues_url":"https://api.github.com/repos/javaslang/javaslang/issues{/number}","pulls_url":"https://api.github.com/repos/javaslang/javaslang/pulls{/number}","milestones_url":"https://api.github.com/repos/javaslang/javaslang/milestones{/number}","notifications_url":"https://api.github.com/repos/javaslang/javaslang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javaslang/javaslang/labels{/name}","releases_url":"https://api.github.com/repos/javaslang/javaslang/releases{/id}","deployments_url":"https://api.github.com/repos/javaslang/javaslang/deployments","created_at":"2014-01-30T14:07:25Z","updated_at":"2016-03-31T07:10:02Z","pushed_at":"2016-03-30T22:56:28Z","git_url":"git://github.com/javaslang/javaslang.git","ssh_url":"git@github.com:javaslang/javaslang.git","clone_url":"https://github.com/javaslang/javaslang.git","svn_url":"https://github.com/javaslang/javaslang","homepage":"http://javaslang.io","size":10692,"stargazers_count":731,"watchers_count":731,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":57,"forks":91,"open_issues":57,"watchers":731,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1245"},"html":{"href":"https://github.com/javaslang/javaslang/pull/1245"},"issue":{"href":"https://api.github.com/repos/javaslang/javaslang/issues/1245"},"comments":{"href":"https://api.github.com/repos/javaslang/javaslang/issues/1245/comments"},"review_comments":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1245/comments"},"review_comment":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javaslang/javaslang/pulls/1245/commits"},"statuses":{"href":"https://api.github.com/repos/javaslang/javaslang/statuses/221ad070bb6e21d94b8ac578619cd1ec423c47d5"}}}}