sample method

Bloom<List<E>> sample(
  1. int count, [
  2. Random? random
])

Selects count elements at random from this collection reactively.

  • count: The number of random elements to sample.
  • random: Optional random number generator.

Implementation

Bloom<List<E>> sample(int count, [Random? random]) =>
    computed((via) => List.unmodifiable(via(bloom).sample(count, random)));