예제 #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
파일: main.go 프로젝트: saprette/gobootcamp
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
파일: test.go 프로젝트: agouriou/go
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)))
}