randomElement

fun <R> Iterable<R>.randomElement(randomGenerator: RandomGenerator): R(source)

Returns a random element of the Iterable using the provided randomGenerator.