{"action":"created","issue":{"url":"https://api.github.com/repos/lloydmeta/frunk/issues/137","repository_url":"https://api.github.com/repos/lloydmeta/frunk","labels_url":"https://api.github.com/repos/lloydmeta/frunk/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/lloydmeta/frunk/issues/137/comments","events_url":"https://api.github.com/repos/lloydmeta/frunk/issues/137/events","html_url":"https://github.com/lloydmeta/frunk/pull/137","id":382983705,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNTU4OTYy","number":137,"title":"Adds FuncMut and PolyMut, which parallel Func and Poly.","user":{"login":"remexre","id":4196789,"node_id":"MDQ6VXNlcjQxOTY3ODk=","avatar_url":"https://avatars1.githubusercontent.com/u/4196789?v=4","gravatar_id":"","url":"https://api.github.com/users/remexre","html_url":"https://github.com/remexre","followers_url":"https://api.github.com/users/remexre/followers","following_url":"https://api.github.com/users/remexre/following{/other_user}","gists_url":"https://api.github.com/users/remexre/gists{/gist_id}","starred_url":"https://api.github.com/users/remexre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remexre/subscriptions","organizations_url":"https://api.github.com/users/remexre/orgs","repos_url":"https://api.github.com/users/remexre/repos","events_url":"https://api.github.com/users/remexre/events{/privacy}","received_events_url":"https://api.github.com/users/remexre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-21T07:06:52Z","updated_at":"2018-11-22T01:56:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/lloydmeta/frunk/pulls/137","html_url":"https://github.com/lloydmeta/frunk/pull/137","diff_url":"https://github.com/lloydmeta/frunk/pull/137.diff","patch_url":"https://github.com/lloydmeta/frunk/pull/137.patch"},"body":"This also makes `HMappable<F>` accept `FnMut` instead of just `Fn`; I don't believe this would be breaking, but I can split it out if it is."},"comment":{"url":"https://api.github.com/repos/lloydmeta/frunk/issues/comments/440889012","html_url":"https://github.com/lloydmeta/frunk/pull/137#issuecomment-440889012","issue_url":"https://api.github.com/repos/lloydmeta/frunk/issues/137","id":440889012,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDg4OTAxMg==","user":{"login":"ExpHP","id":1411280,"node_id":"MDQ6VXNlcjE0MTEyODA=","avatar_url":"https://avatars0.githubusercontent.com/u/1411280?v=4","gravatar_id":"","url":"https://api.github.com/users/ExpHP","html_url":"https://github.com/ExpHP","followers_url":"https://api.github.com/users/ExpHP/followers","following_url":"https://api.github.com/users/ExpHP/following{/other_user}","gists_url":"https://api.github.com/users/ExpHP/gists{/gist_id}","starred_url":"https://api.github.com/users/ExpHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExpHP/subscriptions","organizations_url":"https://api.github.com/users/ExpHP/orgs","repos_url":"https://api.github.com/users/ExpHP/repos","events_url":"https://api.github.com/users/ExpHP/events{/privacy}","received_events_url":"https://api.github.com/users/ExpHP/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T01:56:46Z","updated_at":"2018-11-22T01:56:46Z","author_association":"COLLABORATOR","body":"The question of consistency is currently a null point; Func takes no context, so `poly_fn!` provides no way to describe context (which is a fine limitation since it is difficult to do ergonomically).  \r\n\r\nFurthermore, @remexre's use case is a generic closure, which is *even more* monumentally difficult to make a comfortable interface around. It's only one step away from the most complicated example I have in my own [experimental repo](\r\nhttps://github.com/ExpHP/unbox-macro/blob/proc-macro/examples/examples.rs)\r\n\r\n```rust\r\nunbox!{\r\n    // Define a generic context\r\n    pub struct Contains<'a, T>(&'a [T]) where T: 'a;\r\n\r\n    // Make it a generic closure\r\n    impl Fn <'b, U: 'b>(&self, u: &'b U) -> bool\r\n    where T: PartialEq<U>,\r\n    { self.0.iter().any(|t| t == u) }\r\n}\r\n```\r\n\r\n(remexre's example is almost as complicated, but with a monomorphic context)\r\n\r\n---\r\n\r\nHonestly, in my own projects, I just write my own traits now for mapping over hlists in particular ways with certain types of context, since there's no generic solution I've found comfortable to use."}}
{"actor":{"display_login":"ExpHP"}}