Is there a problem with deprecating wchoose
if the behavior is still available?
now:
[1, 2, 3].wchoose([2, 2, 6].normalizeSum)
using @dscheiba’s suggestion becomes
[1, 2, 3].choose([2, 2, 6])
//16 character benefit
and
[1, 2, 3].wchoose([0.4, 0.4, 0.6])
becomes
[1, 2, 3].choose([0.4, 0.4, 0.6], false)
//5 character cost
I do think it would be nice to have a single method for choosing rather than 2 (as now) or 3!
FWIW the PR author had another solution: choose(weights: nil, normalizedWeights: nil)