Implementations for some past Code Jam problems in Scala