Geometric constructor

Geometric(
  1. double prob
)

Implementation

factory Geometric(double prob) {
  if (prob <= 0 || prob > 1) {
    throw ArgumentError.value(prob, 'prob', 'Must be in range (0, 1]');
  }
  return Geometric._(prob);
}