func main() { ch := make(chan int) go Walk(tree.New(1), ch) for v := range ch { fmt.Println(v) } fmt.Println(Same(tree.New(1), tree.New(1))) fmt.Println(Same(tree.New(1), tree.New(2))) }
func main() { report := make(chan int) go walk(tree.New(1), report) for value := range report { fmt.Println(value) } fmt.Println(same(tree.New(1), tree.New(1))) fmt.Println(same(tree.New(1), tree.New(2))) }
func main() { var t *tree.Tree = tree.New(1) fmt.Println(Same(t, t)) //fmt.Println(Same(tree.New(1), tree.New(1))) //fmt.Println(Same(tree.New(2), tree.New(1))) }