{"action":"created","issue":{"url":"https://api.github.com/repos/ramda/ramda/issues/1426","labels_url":"https://api.github.com/repos/ramda/ramda/issues/1426/labels{/name}","comments_url":"https://api.github.com/repos/ramda/ramda/issues/1426/comments","events_url":"https://api.github.com/repos/ramda/ramda/issues/1426/events","html_url":"https://github.com/ramda/ramda/pull/1426","id":109934443,"number":1426,"title":"define R.map for Object","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-06T04:42:59Z","updated_at":"2015-10-20T22:10:41Z","closed_at":"2015-10-06T14:45:59Z","pull_request":{"url":"https://api.github.com/repos/ramda/ramda/pulls/1426","html_url":"https://github.com/ramda/ramda/pull/1426","diff_url":"https://github.com/ramda/ramda/pull/1426.diff","patch_url":"https://github.com/ramda/ramda/pull/1426.patch"},"body":"This one's for you, @paldepind! :smile:\r\n\r\nBefore anyone freaks out, thinking that Ramda is now making functions do all the things à la Underscore, let me remind you that it's possible to arrive at the same conclusion for two very different reasons. This is not reckless overloading: it makes sense, as I hope to demonstrate.\r\n\r\n  - In the early days very few Ramda functions were polymorphic. I imagine this was a reaction to the many useful but unprincipled polymorphic functions in Underscore.\r\n\r\n  - Over time various Ramda functions have been granted the ability to dispatch to appropriately named methods, allowing Ramda's list functions to be applied to values which are not necessarily array-like.\r\n\r\n  - In recent times Haskell and Fantasy Land have influenced the way certain Ramda contributors view polymorphic functions. Rather than view polymorphic functions as complected, this contingent sees them as useful higher-level abstractions over *groups* of types (*type classes* in Haskell terminology), provided they are principled (i.e. satisfy laws).\r\n\r\n  - Thinking in terms of groups of types encouraged us to define `R.empty` for Object and String in #1236, and then to define `R.isEmpty` in terms of `R.empty` in #1242.\r\n\r\n  - This same thought process led to define `R.map` for Function in #1408.\r\n\r\n`R.map` is no longer a function which operates only on array-like objects. It should operate on any functor. User-defined types such as Maybe can simply provide a `map` method, but Ramda must provide the `map` definition for each built-in type which is a functor: Array, Function, and Object.\r\n"},"comment":{"url":"https://api.github.com/repos/ramda/ramda/issues/comments/149717312","html_url":"https://github.com/ramda/ramda/pull/1426#issuecomment-149717312","issue_url":"https://api.github.com/repos/ramda/ramda/issues/1426","id":149717312,"user":{"login":"cscalfani","id":746561,"avatar_url":"https://avatars.githubusercontent.com/u/746561?v=3","gravatar_id":"","url":"https://api.github.com/users/cscalfani","html_url":"https://github.com/cscalfani","followers_url":"https://api.github.com/users/cscalfani/followers","following_url":"https://api.github.com/users/cscalfani/following{/other_user}","gists_url":"https://api.github.com/users/cscalfani/gists{/gist_id}","starred_url":"https://api.github.com/users/cscalfani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cscalfani/subscriptions","organizations_url":"https://api.github.com/users/cscalfani/orgs","repos_url":"https://api.github.com/users/cscalfani/repos","events_url":"https://api.github.com/users/cscalfani/events{/privacy}","received_events_url":"https://api.github.com/users/cscalfani/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T22:10:41Z","updated_at":"2015-10-20T22:10:41Z","body":"Can you please provide an example for using `map` like `mapObj`?"}}