Пример #1
0
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)))
}
Пример #2
0
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)))

}
Пример #3
0
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)))
}