scala> Random.shuffle((1 to 10).toSet)
res10: scala.collection.immutable.Set[Int] = Set(5, 10, 1, 6, 9, 2, 7, 3, 8, 4)
scala> Random.shuffle((1 to 10).toSet)
res11: scala.collection.immutable.Set[Int] = Set(5, 10, 1, 6, 9, 2, 7, 3, 8, 4)
scala> Random.shuffle((1 to 10).toSet)
res12: scala.collection.immutable.Set[Int] = Set(5, 10, 1, 6, 9, 2, 7, 3, 8, 4)
scala> Random.shuffle((1 to 10).toList)
res13: List[Int] = List(3, 9, 8, 5, 7, 6, 10, 2, 1, 4)
scala> Random.shuffle((1 to 10).toList)
res14: List[Int] = List(5, 10, 2, 9, 4, 7, 8, 6, 1, 3)
scala> Random.shuffle((1 to 10).toList)
res15: List[Int] = List(5, 9, 10, 6, 8, 3, 4, 1, 7, 2)
Так что shuffle может обрабатывать списки просто отлично, но не наборы? Невозможно перетасовать? Почему res10 == res11 == res12?