sample

open fun sample(): T(source)

Returns an element randomly selected from the list

Return

a randomly selected element from the list


open fun sample(size: Int): List<T>(source)

Returns sample of size from the list

Return

randomly selected elements as a list