In Scala you can use scala.util.Random
:
util.Random.shuffle((1 to 10).toSeq)
//Vector(9, 6, 8, 7, 10, 1, 2, 5, 3, 4)
util.Random.shuffle(List('A', 'B', 'C', 'D', 'E', 'F'))
//List(B, D, A, E, C, F)
Your results may vary…
In Scala you can use scala.util.Random
:
util.Random.shuffle((1 to 10).toSeq)
//Vector(9, 6, 8, 7, 10, 1, 2, 5, 3, 4)
util.Random.shuffle(List('A', 'B', 'C', 'D', 'E', 'F'))
//List(B, D, A, E, C, F)
Your results may vary…