{"action":"created","issue":{"url":"https://api.github.com/repos/twitter/algebird/issues/399","labels_url":"https://api.github.com/repos/twitter/algebird/issues/399/labels{/name}","comments_url":"https://api.github.com/repos/twitter/algebird/issues/399/comments","events_url":"https://api.github.com/repos/twitter/algebird/issues/399/events","html_url":"https://github.com/twitter/algebird/pull/399","id":54480352,"number":399,"title":"CMS: add contramap to convert CMS[K] to CMS[L]","user":{"login":"miguno","id":294849,"avatar_url":"https://avatars.githubusercontent.com/u/294849?v=3","gravatar_id":"","url":"https://api.github.com/users/miguno","html_url":"https://github.com/miguno","followers_url":"https://api.github.com/users/miguno/followers","following_url":"https://api.github.com/users/miguno/following{/other_user}","gists_url":"https://api.github.com/users/miguno/gists{/gist_id}","starred_url":"https://api.github.com/users/miguno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguno/subscriptions","organizations_url":"https://api.github.com/users/miguno/orgs","repos_url":"https://api.github.com/users/miguno/repos","events_url":"https://api.github.com/users/miguno/events{/privacy}","received_events_url":"https://api.github.com/users/miguno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-15T17:42:48Z","updated_at":"2015-01-19T15:40:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/twitter/algebird/pulls/399","html_url":"https://github.com/twitter/algebird/pull/399","diff_url":"https://github.com/twitter/algebird/pull/399.diff","patch_url":"https://github.com/twitter/algebird/pull/399.patch"},"body":"Here's a first draft of `contramap` for the CMS monoid as per our discussion in #398.\r\n\r\nThree things stand out:\r\n\r\n- It seems to work. :-)  See `CMSStringTest`.\r\n- We need another implicit value in scope, which is an instance of `Ordering[Array[Byte]]`.  I put this into a separate `CMSOrderingImplicits` object.\r\n- I added the default hashing functions for `Array[Byte]`, `BigInt`, and `String` as per my snippet above.  However, I disabled the `String` hashing function because I lacked the creativity to come up with a non-BigInt, non-String example to showcase how to translate `CMS[K]` into `CMS[L]` (hence I did `CMS[Array[Byte]]` into `CMS[String]`).\r\n\r\nLet me know what you think.  (I do not consider this code to be production-ready yet.)"},"comment":{"url":"https://api.github.com/repos/twitter/algebird/issues/comments/70513444","html_url":"https://github.com/twitter/algebird/pull/399#issuecomment-70513444","issue_url":"https://api.github.com/repos/twitter/algebird/issues/399","id":70513444,"user":{"login":"miguno","id":294849,"avatar_url":"https://avatars.githubusercontent.com/u/294849?v=3","gravatar_id":"","url":"https://api.github.com/users/miguno","html_url":"https://github.com/miguno","followers_url":"https://api.github.com/users/miguno/followers","following_url":"https://api.github.com/users/miguno/following{/other_user}","gists_url":"https://api.github.com/users/miguno/gists{/gist_id}","starred_url":"https://api.github.com/users/miguno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguno/subscriptions","organizations_url":"https://api.github.com/users/miguno/orgs","repos_url":"https://api.github.com/users/miguno/repos","events_url":"https://api.github.com/users/miguno/events{/privacy}","received_events_url":"https://api.github.com/users/miguno/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T15:40:03Z","updated_at":"2015-01-19T15:40:03Z","body":"Again, the build failed only because of a single unstable test that is not related to the CMS code change."}}