{"action":"created","issue":{"url":"https://api.github.com/repos/ramda/ramda/issues/1467","labels_url":"https://api.github.com/repos/ramda/ramda/issues/1467/labels{/name}","comments_url":"https://api.github.com/repos/ramda/ramda/issues/1467/comments","events_url":"https://api.github.com/repos/ramda/ramda/issues/1467/events","html_url":"https://github.com/ramda/ramda/pull/1467","id":113207302,"number":1467,"title":"add R.sequence and R.traverse","user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-10-25T05:21:26Z","updated_at":"2015-10-27T17:35:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ramda/ramda/pulls/1467","html_url":"https://github.com/ramda/ramda/pull/1467","diff_url":"https://github.com/ramda/ramda/pull/1467.diff","patch_url":"https://github.com/ramda/ramda/pull/1467.patch"},"body":"This pull request deprecates `R.commute` and `R.commuteMap` in favour of `R.sequence` and `R.traverse` respectively.\r\n\r\nReasons to rename the functions:\r\n\r\n  - My understanding is that `sequence` and `traverse` are the most common names for these functions. I read and reread [Understanding traverse and sequence][1] in order to come to terms with this concept, so I may be biased by the names used there. Is `commute` the name used anywhere but in Ramda?\r\n\r\n  - Fantasy Land defines [Traversable][2], which requires that a Traversable provide a `sequence` method. It also shows that `traverse` can be derived from `map` and `sequence`.\r\n\r\n  - Currently each Ramda functions which dispatches has the same name as the method to which it dispatches. Having `R.commute` dispatch to `sequence` would break this convention.\r\n\r\nChanges:\r\n\r\n  - `R.sequence` dispatches; `R.commute` does not.\r\n\r\n  - `R.traverse` takes `(of, f, traversable)` rather than `(f, of, traversable)`. It's more likely one would apply several different `f` transformations to a single :twisted_rightwards_arrows: type inversion than apply the same transformation to several different type inversions. I also like having `of` off to the side as it conveys type information that would be unnecessary in the presence of type inference.\r\n\r\nI'm particularly interested in hearing from @scott-christopher, who has a better grasp of this than I do. We have discussed these changes (though Scott is happy to keep the names) but I'm not sure that I've done everything correctly.\r\n\r\nI'm about to :airplane: from Auckland to San Francisco, so I'll be offline for the next 12 hours or so.\r\n\r\n\r\n[1]: http://fsharpforfunandprofit.com/posts/elevated-world-4/\r\n[2]: https://github.com/fantasyland/fantasy-land#traversable\r\n"},"comment":{"url":"https://api.github.com/repos/ramda/ramda/issues/comments/151580860","html_url":"https://github.com/ramda/ramda/pull/1467#issuecomment-151580860","issue_url":"https://api.github.com/repos/ramda/ramda/issues/1467","id":151580860,"user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T17:35:34Z","updated_at":"2015-10-27T17:35:34Z","body":"We could keep the name `commute` (which I also like) but have `R.commute` dispatch to `sequence`.\r\n"}}