{"action":"opened","issue":{"url":"https://api.github.com/repos/freebroccolo/ackermann.rs/issues/15","labels_url":"https://api.github.com/repos/freebroccolo/ackermann.rs/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/freebroccolo/ackermann.rs/issues/15/comments","events_url":"https://api.github.com/repos/freebroccolo/ackermann.rs/issues/15/events","html_url":"https://github.com/freebroccolo/ackermann.rs/issues/15","id":64982308,"number":15,"title":"Simplify tree nodes","user":{"login":"freebroccolo","id":151197,"avatar_url":"https://avatars.githubusercontent.com/u/151197?v=3","gravatar_id":"","url":"https://api.github.com/users/freebroccolo","html_url":"https://github.com/freebroccolo","followers_url":"https://api.github.com/users/freebroccolo/followers","following_url":"https://api.github.com/users/freebroccolo/following{/other_user}","gists_url":"https://api.github.com/users/freebroccolo/gists{/gist_id}","starred_url":"https://api.github.com/users/freebroccolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freebroccolo/subscriptions","organizations_url":"https://api.github.com/users/freebroccolo/orgs","repos_url":"https://api.github.com/users/freebroccolo/repos","events_url":"https://api.github.com/users/freebroccolo/events{/privacy}","received_events_url":"https://api.github.com/users/freebroccolo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-28T20:07:16Z","updated_at":"2015-03-28T20:07:16Z","closed_at":null,"body":"A `Block` node looks like this:\r\n\r\n```\r\nBlock {\r\n    parity: bool,\r\n    head: Cow<'a, Node<'a>>,\r\n    tail: Cow<'a, [Cow<'a, Node<'a>>]>,\r\n}\r\n```\r\n\r\nThis is essentially fashioned after the functional representation. Given that we're working with slices and arrays, where calculating length is `O(1)` (vs `O(n)` for lists), it probably doesn't make sense to store the parity. I also don't think storing the `head` separately is worthwhile. It does express the fact that, taken together, the block has at least one branch, but it adds an extra pointer to the size of the structure and complicates several of the algorithms.\r\n\r\nIt would probably be better to just store the block as the tail and provide a `parity` and `head` method."}}