{"action":"opened","issue":{"url":"https://api.github.com/repos/siroky/FuncSharp/issues/6","labels_url":"https://api.github.com/repos/siroky/FuncSharp/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/siroky/FuncSharp/issues/6/comments","events_url":"https://api.github.com/repos/siroky/FuncSharp/issues/6/events","html_url":"https://github.com/siroky/FuncSharp/issues/6","id":55356850,"number":6,"title":"Object to type-match sum","user":{"login":"siroky","id":435787,"avatar_url":"https://avatars.githubusercontent.com/u/435787?v=3","gravatar_id":"","url":"https://api.github.com/users/siroky","html_url":"https://github.com/siroky","followers_url":"https://api.github.com/users/siroky/followers","following_url":"https://api.github.com/users/siroky/following{/other_user}","gists_url":"https://api.github.com/users/siroky/gists{/gist_id}","starred_url":"https://api.github.com/users/siroky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siroky/subscriptions","organizations_url":"https://api.github.com/users/siroky/orgs","repos_url":"https://api.github.com/users/siroky/repos","events_url":"https://api.github.com/users/siroky/events{/privacy}","received_events_url":"https://api.github.com/users/siroky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/siroky/FuncSharp/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-24T03:07:59Z","updated_at":"2015-01-24T03:07:59Z","closed_at":null,"body":"```csharp\r\nclass A { public string a; }\r\nclass B { public string b; }\r\nclass C { public string c; }\r\n\r\nvar x = new B();\r\nvar y = new object();\r\n\r\nvar e1 = x.ToSum<A, B, C>(); // returns Sum<A, B, C>(2/3, x)\r\nvar e2 = y.ToSum<A, B, C>(); // throws exception\r\n\r\nvar result = x.ToSum<A, B, C>().Match(\r\n    a => a.a,\r\n    b => b.b,\r\n    c => c.c\r\n);\r\n```"}}