small fix to example
initial translation of example 1-5 to Groovy