例如,对于任何给定的集合,
val fruits = Set("apple", "grape", "pear", "banana")
如何从中获取随机元素fruits?
fruits
非常感谢.
random collections scala set scala-collections
collections ×1
random ×1
scala ×1
scala-collections ×1
set ×1