sample function

dynamic sample(
  1. dynamic collection
)

Implementation

dynamic sample(dynamic collection) =>
    collection.elementAt(Random().nextInt(collection.length));