The visitor design pattern the Scala way