O'Reilly logo
  • Philippe Derome thinks this is interesting:

randomElement

From

Cover of Scala in Depth

Note

the body of the function is left as an exercise to the reader, ok I guess.