{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/a00512b12118ebd20d2043802b38bd02?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a00512b12118ebd20d2043802b38bd02","url":"https://api.github.com/users/ziggystar","login":"ziggystar","id":459632},"milestone":null,"labels":[],"assignee":null,"updated_at":"2011-10-31T12:18:10Z","comments":1,"closed_at":null,"url":"https://api.github.com/repos/scalaz/scalaz/issues/42","body":"scala> val t1 = node(1, Stream(leaf(2), node(3, Stream(leaf(4), leaf(5)))))\r\nt1: scalaz.Tree[Int] = <tree>\r\n\r\nscala> t1.flatten.tail.map(x => t1.loc.findChild(_.rootLabel == x)).force\r\nres6: scala.collection.immutable.Stream[Option[scalaz.TreeLoc[Int]]] = Stream(Some(<treeloc>), Some(<treeloc>), None, None)\r\n\r\nres6 should contain only Somes. And maybe remarking, that findChild will NOT find the root node would be nice. I expected it to also find the root.","html_url":"https://github.com/scalaz/scalaz/issues/42","title":"TreeLoc.findChild doesn't find leaf nodes","number":42,"id":2096294,"created_at":"2011-10-31T12:17:26Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/a00512b12118ebd20d2043802b38bd02?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a00512b12118ebd20d2043802b38bd02","url":"https://api.github.com/users/ziggystar","login":"ziggystar","id":459632},"updated_at":"2011-10-31T12:18:10Z","url":"https://api.github.com/repos/scalaz/scalaz/issues/comments/2576176","body":"I only tested on the tail because findChild does not find the root node.","id":2576176,"created_at":"2011-10-31T12:18:10Z"}}