{"action":"created","issue":{"url":"https://api.github.com/repos/rakudo/rakudo/issues/685","labels_url":"https://api.github.com/repos/rakudo/rakudo/issues/685/labels{/name}","comments_url":"https://api.github.com/repos/rakudo/rakudo/issues/685/comments","events_url":"https://api.github.com/repos/rakudo/rakudo/issues/685/events","html_url":"https://github.com/rakudo/rakudo/pull/685","id":126572526,"number":685,"title":"Fix several issues with List.squish","user":{"login":"skids","id":59003,"avatar_url":"https://avatars.githubusercontent.com/u/59003?v=3","gravatar_id":"","url":"https://api.github.com/users/skids","html_url":"https://github.com/skids","followers_url":"https://api.github.com/users/skids/followers","following_url":"https://api.github.com/users/skids/following{/other_user}","gists_url":"https://api.github.com/users/skids/gists{/gist_id}","starred_url":"https://api.github.com/users/skids/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skids/subscriptions","organizations_url":"https://api.github.com/users/skids/orgs","repos_url":"https://api.github.com/users/skids/repos","events_url":"https://api.github.com/users/skids/events{/privacy}","received_events_url":"https://api.github.com/users/skids/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T04:02:32Z","updated_at":"2016-01-19T05:31:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rakudo/rakudo/pulls/685","html_url":"https://github.com/rakudo/rakudo/pull/685","diff_url":"https://github.com/rakudo/rakudo/pull/685.diff","patch_url":"https://github.com/rakudo/rakudo/pull/685.patch"},"body":"  Only evaluate :&as and :&with the minimum number of times\r\n  Prevent IterationEnd from leaking into :&as and :&with calls\r\n  Use intuitive ordering of :&with args for non-commutative :with\r\n  Always pass :&with consecutive elements of the original list\r\n  Once committed to doing a push-all, no need to mutate anymore\r\n  Might possibly fix r-j RT#126527 -- needs someone to test\r\n  Will commit roast tests for these behaviors after merge"},"comment":{"url":"https://api.github.com/repos/rakudo/rakudo/issues/comments/172743115","html_url":"https://github.com/rakudo/rakudo/pull/685#issuecomment-172743115","issue_url":"https://api.github.com/repos/rakudo/rakudo/issues/685","id":172743115,"user":{"login":"skids","id":59003,"avatar_url":"https://avatars.githubusercontent.com/u/59003?v=3","gravatar_id":"","url":"https://api.github.com/users/skids","html_url":"https://github.com/skids","followers_url":"https://api.github.com/users/skids/followers","following_url":"https://api.github.com/users/skids/following{/other_user}","gists_url":"https://api.github.com/users/skids/gists{/gist_id}","starred_url":"https://api.github.com/users/skids/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skids/subscriptions","organizations_url":"https://api.github.com/users/skids/orgs","repos_url":"https://api.github.com/users/skids/repos","events_url":"https://api.github.com/users/skids/events{/privacy}","received_events_url":"https://api.github.com/users/skids/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T05:31:03Z","updated_at":"2016-01-19T05:31:03Z","body":"Passes both 6.c (minus known failing tests) and master roast sets.\r\n\r\nThe biggest change here is the order of :with arguments.  A grep of the\r\necosystem showed nobody using :with, so odds are low that current\r\nbehavior is relied upon.\r\n\r\nWhen writing a custom :with this preserves the right-to-left ordering\r\nof the arguments in the list so one can write :with({ $^last > $^next })\r\n\r\nThe second biggest change is that consecutive elements are always compared,\r\nso in the case of 1, 2, 3 we do not compare 1 with 3.  This is essential if, for\r\nexample, you want to squish monotonically increasing sequences.\r\n\r\n$ perl6 -e '(1,2,3,4,4,5,6,7,1,2,3).squish(:with({ $^last == $^next.pred })).say'\r\n(1 4 1)\r\n"}}