{"action":"opened","issue":{"url":"https://api.github.com/repos/ldionne/hana/issues/59","labels_url":"https://api.github.com/repos/ldionne/hana/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/ldionne/hana/issues/59/comments","events_url":"https://api.github.com/repos/ldionne/hana/issues/59/events","html_url":"https://github.com/ldionne/hana/issues/59","id":73065957,"number":59,"title":"[Pair] Provide a function to modify one component of a pair?","user":{"login":"ldionne","id":700834,"avatar_url":"https://avatars.githubusercontent.com/u/700834?v=3","gravatar_id":"","url":"https://api.github.com/users/ldionne","html_url":"https://github.com/ldionne","followers_url":"https://api.github.com/users/ldionne/followers","following_url":"https://api.github.com/users/ldionne/following{/other_user}","gists_url":"https://api.github.com/users/ldionne/gists{/gist_id}","starred_url":"https://api.github.com/users/ldionne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldionne/subscriptions","organizations_url":"https://api.github.com/users/ldionne/orgs","repos_url":"https://api.github.com/users/ldionne/repos","events_url":"https://api.github.com/users/ldionne/events{/privacy}","received_events_url":"https://api.github.com/users/ldionne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ldionne/hana/labels/feature","name":"feature","color":"207de5"},{"url":"https://api.github.com/repos/ldionne/hana/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-04T16:30:11Z","updated_at":"2015-05-04T16:30:11Z","closed_at":null,"body":"It is sometimes useful to modify a single component of a pair by applying a function to it. However, writing \r\n\r\n```cpp\r\nauto p = make_pair(...);\r\nauto new_p = make_pair(function(first(p)), second(p));\r\n```\r\n\r\nis redundant and it seems like there should be a generalization. Actually, this could be generalized to arbitrary sequences; mapping `f` over the `n`th element only."}}