kmongo / kotlin.collections / com.mongodb.client.MongoIterable / shuffled

shuffled

fun <T> MongoIterable<T>.shuffled(): List<T> (source)

Returns a new list with the elements of this list randomly shuffled.

fun <T> MongoIterable<T>.shuffled(random: Random): List<T> (source)

Returns a new list with the elements of this list randomly shuffled using the specified random instance as the source of randomness.