package main
import ( "fmt")
type BinaryTree(type T) struct { Value T Left, Right *BinaryTree(T)}
func main() { n := int(42) tree := BinaryTree{ Value: n, Left: {Value: n - 1}, Right: {Value: n + 1}, }
fmt.Println(tree)}package main
import ( "fmt")
type BinaryTree(type T) struct { Value T Left, Right *BinaryTree(T)}
func main() { n := int(42) tree := BinaryTree(int) { Value: n, Left: &BinaryTree(int){Value: n - 1}, Right: &BinaryTree(int){Value: n + 1}, }
fmt.Println(tree)}