{"action":"created","issue":{"url":"https://api.github.com/repos/stew/dogs/issues/5","labels_url":"https://api.github.com/repos/stew/dogs/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/stew/dogs/issues/5/comments","events_url":"https://api.github.com/repos/stew/dogs/issues/5/events","html_url":"https://github.com/stew/dogs/pull/5","id":108172183,"number":5,"title":"Immutable, singly-linked list implementation.","user":{"login":"non","id":218045,"avatar_url":"https://avatars.githubusercontent.com/u/218045?v=3","gravatar_id":"","url":"https://api.github.com/users/non","html_url":"https://github.com/non","followers_url":"https://api.github.com/users/non/followers","following_url":"https://api.github.com/users/non/following{/other_user}","gists_url":"https://api.github.com/users/non/gists{/gist_id}","starred_url":"https://api.github.com/users/non/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/non/subscriptions","organizations_url":"https://api.github.com/users/non/orgs","repos_url":"https://api.github.com/users/non/repos","events_url":"https://api.github.com/users/non/events{/privacy}","received_events_url":"https://api.github.com/users/non/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-24T17:04:05Z","updated_at":"2015-09-25T07:12:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/stew/dogs/pulls/5","html_url":"https://github.com/stew/dogs/pull/5","diff_url":"https://github.com/stew/dogs/pull/5.diff","patch_url":"https://github.com/stew/dogs/pull/5.patch"},"body":"This code is very similar to scala.List, with a few key differences:\r\n\r\n1. It does not expose any \"unsafe\" methods.\r\n2. It is invariant, whereas scala.List is covariant.\r\n3. It uses subtyping to differentiate non-emptiness.\r\n4. It provides Cats type class instances.\r\n5. It does not currently provide a fast (mutable) builder.\r\n\r\nThe types defined here are as follows:\r\n\r\n - Lst[A] represents a list of zero-or-more elements.\r\n - Nel[A] represents a list of one-or-more elements.\r\n - El[A]  represents an empty list (exactly zero elements).\r\n\r\n(Every Lst[A] is either a Nel[A] or an El[A].)\r\n\r\nWhile it does not (yet) provide every single Scala collection\r\nmethod, it provides a decent number of them. Type class instances\r\nare provided for both Lst and Nel (for example, Nel has a Comonad\r\ninstance, whereas Lst only has a CoflatMap instance)."},"comment":{"url":"https://api.github.com/repos/stew/dogs/issues/comments/143146825","html_url":"https://github.com/stew/dogs/pull/5#issuecomment-143146825","issue_url":"https://api.github.com/repos/stew/dogs/issues/5","id":143146825,"user":{"login":"stew","id":66772,"avatar_url":"https://avatars.githubusercontent.com/u/66772?v=3","gravatar_id":"","url":"https://api.github.com/users/stew","html_url":"https://github.com/stew","followers_url":"https://api.github.com/users/stew/followers","following_url":"https://api.github.com/users/stew/following{/other_user}","gists_url":"https://api.github.com/users/stew/gists{/gist_id}","starred_url":"https://api.github.com/users/stew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stew/subscriptions","organizations_url":"https://api.github.com/users/stew/orgs","repos_url":"https://api.github.com/users/stew/repos","events_url":"https://api.github.com/users/stew/events{/privacy}","received_events_url":"https://api.github.com/users/stew/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T07:12:39Z","updated_at":"2015-09-25T07:12:39Z","body":"I'm going to write up some tests for this, but I like the idea, It is one I have played around with in the past.\r\n\r\nThese names aren't terrible. \"a list is either a nel or an el\" has a nice poetic meter :). I'd also be happy with Cons and End instead of Nel and El\r\n\r\nI am able to convince myself that I would be okay with calling the trait `List`. Which is certainly a bad idea because its going to piss a bunch of people off right out of the gate, so perhaps, nevermind."}}