Randomize an array in Scala

If you have a scala collection, you can re-arrange the items at random

import scala.util.Random

val randomized = Random.shuffle(domains)

Leave a Reply

Your email address will not be published. Required fields are marked *