{"action":"created","issue":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library/issues/117","repository_url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library","labels_url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library/issues/117/comments","events_url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library/issues/117/events","html_url":"https://github.com/Gabriel439/Haskell-Foldl-Library/issues/117","id":339107617,"node_id":"MDU6SXNzdWUzMzkxMDc2MTc=","number":117,"title":"Now that we have Control.Scanl, how about Control.Scanr?","user":{"login":"kccqzy","id":10167149,"node_id":"MDQ6VXNlcjEwMTY3MTQ5","avatar_url":"https://avatars1.githubusercontent.com/u/10167149?v=4","gravatar_id":"","url":"https://api.github.com/users/kccqzy","html_url":"https://github.com/kccqzy","followers_url":"https://api.github.com/users/kccqzy/followers","following_url":"https://api.github.com/users/kccqzy/following{/other_user}","gists_url":"https://api.github.com/users/kccqzy/gists{/gist_id}","starred_url":"https://api.github.com/users/kccqzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kccqzy/subscriptions","organizations_url":"https://api.github.com/users/kccqzy/orgs","repos_url":"https://api.github.com/users/kccqzy/repos","events_url":"https://api.github.com/users/kccqzy/events{/privacy}","received_events_url":"https://api.github.com/users/kccqzy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-07T01:42:45Z","updated_at":"2018-07-08T03:29:39Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The new `Scanl` module is looking really great. However, by symmetry, one would want to have a `Scanr` module that basically does the same thing but (essentially) traverses the container in reverse. \r\n\r\nSo the final `Scanl` and `Scanr` modules would be a generalization of base's [`mapAccumL`](http://hackage.haskell.org/package/base-4.11.1.0/docs/Data-Traversable.html#v:mapAccumL) and [`mapAccumR`](http://hackage.haskell.org/package/base-4.11.1.0/docs/Data-Traversable.html#v:mapAccumR).\r\n\r\nIn terms of implementation, the new `Scanr` module would be achieved through the use of the reverse state monad, just like `mapAccumR` in `base`. (This is the reverse state monad I'm talking about: <http://hackage.haskell.org/package/base-4.11.1.0/docs/src/Data.Functor.Utils.html#StateR>).\r\n\r\nHow do you like this idea? If this looks good, I can whip up a preliminary implementation soon."},"comment":{"url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library/issues/comments/403259384","html_url":"https://github.com/Gabriel439/Haskell-Foldl-Library/issues/117#issuecomment-403259384","issue_url":"https://api.github.com/repos/Gabriel439/Haskell-Foldl-Library/issues/117","id":403259384,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzI1OTM4NA==","user":{"login":"Gabriel439","id":1313787,"node_id":"MDQ6VXNlcjEzMTM3ODc=","avatar_url":"https://avatars3.githubusercontent.com/u/1313787?v=4","gravatar_id":"","url":"https://api.github.com/users/Gabriel439","html_url":"https://github.com/Gabriel439","followers_url":"https://api.github.com/users/Gabriel439/followers","following_url":"https://api.github.com/users/Gabriel439/following{/other_user}","gists_url":"https://api.github.com/users/Gabriel439/gists{/gist_id}","starred_url":"https://api.github.com/users/Gabriel439/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gabriel439/subscriptions","organizations_url":"https://api.github.com/users/Gabriel439/orgs","repos_url":"https://api.github.com/users/Gabriel439/repos","events_url":"https://api.github.com/users/Gabriel439/events{/privacy}","received_events_url":"https://api.github.com/users/Gabriel439/received_events","type":"User","site_admin":false},"created_at":"2018-07-08T03:29:39Z","updated_at":"2018-07-08T03:29:39Z","author_association":"OWNER","body":"@kccqzy: I think this is a good idea, but I don't think this needs to be in a separate module.  The `Scan` type is not inherently directional and you can reuse the same type to process the container in reverse so I think this can be done by just adding extra utilities to the existing `Control.Scanl` module"}}
{"actor":{"display_login":"Gabriel439"}}