{"action":"created","issue":{"url":"https://api.github.com/repos/plaid/sanctuary/issues/142","repository_url":"https://api.github.com/repos/plaid/sanctuary","labels_url":"https://api.github.com/repos/plaid/sanctuary/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/plaid/sanctuary/issues/142/comments","events_url":"https://api.github.com/repos/plaid/sanctuary/issues/142/events","html_url":"https://github.com/plaid/sanctuary/pull/142","id":130149395,"number":142,"title":"Add S.map function","user":{"login":"svozza","id":8573472,"avatar_url":"https://avatars.githubusercontent.com/u/8573472?v=3","gravatar_id":"","url":"https://api.github.com/users/svozza","html_url":"https://github.com/svozza","followers_url":"https://api.github.com/users/svozza/followers","following_url":"https://api.github.com/users/svozza/following{/other_user}","gists_url":"https://api.github.com/users/svozza/gists{/gist_id}","starred_url":"https://api.github.com/users/svozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svozza/subscriptions","organizations_url":"https://api.github.com/users/svozza/orgs","repos_url":"https://api.github.com/users/svozza/repos","events_url":"https://api.github.com/users/svozza/events{/privacy}","received_events_url":"https://api.github.com/users/svozza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-01-31T16:37:51Z","updated_at":"2016-04-11T05:25:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/plaid/sanctuary/pulls/142","html_url":"https://github.com/plaid/sanctuary/pull/142","diff_url":"https://github.com/plaid/sanctuary/pull/142.diff","patch_url":"https://github.com/plaid/sanctuary/pull/142.patch"},"body":"This comment in #140 struck a chord with me:\r\n\r\n>It's wonderful how simple a function's implementation becomes when one is able to restrict its domain. \r\n\r\nWhen I look at the implementation of `map` in Ramda, what strikes me is how complicated it is. I think we should take advantage of the type checking we have and simplify wherever possible. In fact, we could simplify this further by not special casing arrays at the cost of losing IE8 compatibility.\r\n\r\nOne side effect of this PR is that it means `Sanctuary` now has an alias, i.e., `S.lift`; I'm not sure how we resolve this other than deprecating the unary version of `lift`.\r\n\r\nAnother benefit I can see here would be for performance should a user decide to run with type-checking disabled in production.\r\n\r\nThis version is more restrictive in that it doesn't operate on Objects as our definition of `Functor` does not include them. I actually prefer this."},"comment":{"url":"https://api.github.com/repos/plaid/sanctuary/issues/comments/208168299","html_url":"https://github.com/plaid/sanctuary/pull/142#issuecomment-208168299","issue_url":"https://api.github.com/repos/plaid/sanctuary/issues/142","id":208168299,"user":{"login":"svozza","id":8573472,"avatar_url":"https://avatars.githubusercontent.com/u/8573472?v=3","gravatar_id":"","url":"https://api.github.com/users/svozza","html_url":"https://github.com/svozza","followers_url":"https://api.github.com/users/svozza/followers","following_url":"https://api.github.com/users/svozza/following{/other_user}","gists_url":"https://api.github.com/users/svozza/gists{/gist_id}","starred_url":"https://api.github.com/users/svozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svozza/subscriptions","organizations_url":"https://api.github.com/users/svozza/orgs","repos_url":"https://api.github.com/users/svozza/repos","events_url":"https://api.github.com/users/svozza/events{/privacy}","received_events_url":"https://api.github.com/users/svozza/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T05:25:50Z","updated_at":"2016-04-11T05:25:50Z","body":":+1: Btw, can I change the treatment of objects back to a straight `for` loop without R.keys etc? I think the implementation of a function as fundamental as `map` should be as low-level as possible."}}