Scala's sample codes.