Versions in this module Expand all Collapse all v2 v2.1.0 Oct 20, 2023 v2.0.3 Jun 27, 2023 Changes in this version + type Choice struct + Item T + Weight W + func NewChoice(item T, weight W) Choice[T, W] + type Chooser struct + func NewChooser(choices ...Choice[T, W]) (*Chooser[T, W], error) + func (c Chooser[T, W]) Pick() T + func (c Chooser[T, W]) PickSource(rs *rand.Rand) T