"血をもって書け。そうすればあなたは、血が精神だということを経験するだろう。"

golang

A Tour of Go Exercise: Equivalent Binary Trees

模範解答かわからないけど解いてみたのでメモしておく。 Exercise: Equivalent Binary Trees package main import "golang.org/x/tour/tree" import "fmt" func Walk(t *tree.Tree, ch chan int) { if t.Left != nil {Walk(t.Left, ch)} ch <- t.Value if t.…