Playing around with some Scala implementations of some Java code to compare.