Solving Rosalind in Scala