0

I created the following function, permutations, to produce all permutations of a List[A].
Example:
scala> net.Permutations.permutations("ab".split("").toList)
res3: List[List[String]] = List(List(a, b), List(b, a))
Code:
object Permutations {
def permutations[A](str: List[A]): List[List[A]] =...