{"action":"created","issue":{"url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1042","repository_url":"https://api.github.com/repos/NetLogo/NetLogo","labels_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1042/labels{/name}","comments_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1042/comments","events_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1042/events","html_url":"https://github.com/NetLogo/NetLogo/issues/1042","id":154572235,"number":1042,"title":"all-positions","user":{"login":"arthurhjorth","id":1860843,"avatar_url":"https://avatars.githubusercontent.com/u/1860843?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurhjorth","html_url":"https://github.com/arthurhjorth","followers_url":"https://api.github.com/users/arthurhjorth/followers","following_url":"https://api.github.com/users/arthurhjorth/following{/other_user}","gists_url":"https://api.github.com/users/arthurhjorth/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurhjorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurhjorth/subscriptions","organizations_url":"https://api.github.com/users/arthurhjorth/orgs","repos_url":"https://api.github.com/users/arthurhjorth/repos","events_url":"https://api.github.com/users/arthurhjorth/events{/privacy}","received_events_url":"https://api.github.com/users/arthurhjorth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NetLogo/NetLogo/labels/enhancement","name":"enhancement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-12T20:20:49Z","updated_at":"2016-05-13T14:42:52Z","closed_at":null,"body":"`position` currently only reports the position of the first found, similar element in a list. It would be great to have an `all-positions` reporter that gives you a list of all of the positions of the argument in a provided list. Wouldn't it?"},"comment":{"url":"https://api.github.com/repos/NetLogo/NetLogo/issues/comments/219063425","html_url":"https://github.com/NetLogo/NetLogo/issues/1042#issuecomment-219063425","issue_url":"https://api.github.com/repos/NetLogo/NetLogo/issues/1042","id":219063425,"user":{"login":"qiemem","id":28215,"avatar_url":"https://avatars.githubusercontent.com/u/28215?v=3","gravatar_id":"","url":"https://api.github.com/users/qiemem","html_url":"https://github.com/qiemem","followers_url":"https://api.github.com/users/qiemem/followers","following_url":"https://api.github.com/users/qiemem/following{/other_user}","gists_url":"https://api.github.com/users/qiemem/gists{/gist_id}","starred_url":"https://api.github.com/users/qiemem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiemem/subscriptions","organizations_url":"https://api.github.com/users/qiemem/orgs","repos_url":"https://api.github.com/users/qiemem/repos","events_url":"https://api.github.com/users/qiemem/events{/privacy}","received_events_url":"https://api.github.com/users/qiemem/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T14:42:52Z","updated_at":"2016-05-13T14:42:52Z","body":"For reference, implementation in NetLogo:\r\n\r\n```\r\nto-report all-positions [ x lst ]\r\n  report map first filter [ last ? = x ] n-values (length lst) [ list ? item ? lst ]\r\nend\r\n```\r\n\r\nSome context: this came up in class yesterday (specifically, someone wanted to find all the indices of the largest value). Arthur and I stuttered for a few minutes before essentially saying \"throw `n-values`, `filter` and `map` in there in some order...\"."}}