sample method
Returns n random elements without replacement.
Implementation
List<T> sample(int n, {int? seed}) {
if (n >= length) return [...this]..shuffle(math.Random(seed));
final copy = [...this]..shuffle(math.Random(seed));
return copy.take(n).toList();
}