{"action":"created","issue":{"url":"https://api.github.com/repos/elm-community/list-extra/issues/53","repository_url":"https://api.github.com/repos/elm-community/list-extra","labels_url":"https://api.github.com/repos/elm-community/list-extra/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/elm-community/list-extra/issues/53/comments","events_url":"https://api.github.com/repos/elm-community/list-extra/issues/53/events","html_url":"https://github.com/elm-community/list-extra/issues/53","id":233423724,"number":53,"title":"Is `groupsOfWithStep` Behaving Properly?","user":{"login":"prikhi","id":1304102,"avatar_url":"https://avatars1.githubusercontent.com/u/1304102?v=3","gravatar_id":"","url":"https://api.github.com/users/prikhi","html_url":"https://github.com/prikhi","followers_url":"https://api.github.com/users/prikhi/followers","following_url":"https://api.github.com/users/prikhi/following{/other_user}","gists_url":"https://api.github.com/users/prikhi/gists{/gist_id}","starred_url":"https://api.github.com/users/prikhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prikhi/subscriptions","organizations_url":"https://api.github.com/users/prikhi/orgs","repos_url":"https://api.github.com/users/prikhi/repos","events_url":"https://api.github.com/users/prikhi/events{/privacy}","received_events_url":"https://api.github.com/users/prikhi/received_events","type":"User","site_admin":false},"labels":[{"id":381203913,"url":"https://api.github.com/repos/elm-community/list-extra/labels/bug","name":"bug","color":"ee0701","default":true},{"id":381203918,"url":"https://api.github.com/repos/elm-community/list-extra/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-04T10:00:11Z","updated_at":"2017-06-05T06:19:31Z","closed_at":null,"body":"The docs for `groupsOfWithStep` say:\r\n> Split list into groups of size given by the first argument. After each group, drop a number of elements given by the second argument before starting the next group.\r\n\r\nWith this example & test:\r\n```\r\ngroupsOfWithStep 2 1 (range 1 4) == [[1,2],[2,3],[3,4]]\r\n```\r\nBut shouldn't it be something like this(`groupsOfWithStep 2 1 (range 1 6)`):\r\n```\r\n[1, 2, 3, 4, 5, 6]\r\n=> [ [1, 2] ]\r\n=> [ [1, 2], [4, 5] ]\r\n```\r\nIt should take 2, then drop 1, then take 2, right? Unless I'm misunderstanding the documentation.\r\n\r\nEdit: Same with `greedyGroupsOfWithStep`?\r\n```\r\ngreedyGroupsOfWithStep 3 2 (range 1 6) == [[1,2,3],[3,4,5],[5,6]]\r\n```\r\nShould be `[ [1, 2, 3], [6] ]`?"},"comment":{"url":"https://api.github.com/repos/elm-community/list-extra/issues/comments/306112392","html_url":"https://github.com/elm-community/list-extra/issues/53#issuecomment-306112392","issue_url":"https://api.github.com/repos/elm-community/list-extra/issues/53","id":306112392,"user":{"login":"pzp1997","id":6352546,"avatar_url":"https://avatars3.githubusercontent.com/u/6352546?v=3","gravatar_id":"","url":"https://api.github.com/users/pzp1997","html_url":"https://github.com/pzp1997","followers_url":"https://api.github.com/users/pzp1997/followers","following_url":"https://api.github.com/users/pzp1997/following{/other_user}","gists_url":"https://api.github.com/users/pzp1997/gists{/gist_id}","starred_url":"https://api.github.com/users/pzp1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pzp1997/subscriptions","organizations_url":"https://api.github.com/users/pzp1997/orgs","repos_url":"https://api.github.com/users/pzp1997/repos","events_url":"https://api.github.com/users/pzp1997/events{/privacy}","received_events_url":"https://api.github.com/users/pzp1997/received_events","type":"User","site_admin":false},"created_at":"2017-06-05T06:19:31Z","updated_at":"2017-06-05T06:19:31Z","body":"I looked at the author's commit message, and they referenced the [`partition`](https://clojuredocs.org/clojure.core/partition) function from Clojure. Based on the documentation for that function, it looks like the intended meaning is to drop `step` number of elements counting starting from the *previous partition* before continuing. If `step` is the same as the partition size, each element will be contained in exactly one partition (except for perhaps towards the end depending on greediness). If it is less than the partition size, there will be overlap in the partitions. If it is greater than the partition size, then some elements will be skipped. I can submit a PR to fix the documentation in the morning."}}
{"actor":{"display_login":"pzp1997"}}