'homework' from "Programming in Go"