code kata in Groovy