A translation of a favorite Scala example to golang.