package weightedrandom // New returns an new instance of WeightRandom func New[T any](af AdjustFunc, rf RandomFunc, acf AccessModifier) *WeightRandom[T] { return &WeightRandom[T]{ data: []*weightitem[T]{}, weightFunc: af, randomFunc: rf, accessfunc: acf, } }