func Same(t1, t2 *tree.Tree) bool {
	c1 := make(chan int)
	c2 := make(chan int)
	quit := make(chan int)
	defer close(quit)
	go Walk(t1, c1, quit)
	go Walk(t2, c2, quit)
	for {
		v1, ok1 := <-c1
		v2, ok2 := <-c2
		if !ok1 || !ok2 {
			return ok1 == ok2
		}
		if v1 != v2 {
			return false
		}
	}
}
// Same determines whether the trees
// t1 and t2 contain the same values.
Same determines whether the trees
t1 and t2 contain the same values.
// Same determines whether the trees // t1 and t2 contain the same values .
func Same(t1, t2 *tree.Tree) bool {
	c1 := make(chan int)
	c2 := make(chan int)
	quit := make(chan int)
	defer close(quit)
	go Walk(t1, c1, quit)
	go Walk(t2, c2, quit)
	for {
		v1, ok1 := <-c1
		v2, ok2 := <-c2
		if !ok1 || !ok2 {
			return ok1 == ok2
		}
		if v1 != v2 {
			return false
		}
	}
}
func Same ( t1 , t2 * tree . Tree ) bool { c1 := make ( chan int ) c2 := make ( chan int ) quit := make ( chan int ) defer close ( quit ) go Walk ( t1 , c1 , quit ) go Walk ( t2 , c2 , quit ) for { v1 , ok1 := <- c1 v2 , ok2 := <- c2 if ! ok1 || ! ok2 { return ok1 == ok2 } if v1 != v2 { return false } } }
Same determines whether the trees
t1 and t2 contain the same values.
Same determines whether the trees t1 and t2 contain the same values .