Code translation from Kent Beck book Smalltalk Best Practice Patterns