Open yoavweiss opened 1 year ago
When making this change, we will need to consider how developers will be able to feature detect this and support versions both with and without this change.
As this is purely syntactic sugar, developers could always just pass each contribution individually to the function and that may be the easiest way to support both versions (although this does defeat the purpose of the change a little). It would also be possible to try/catch a TypeError when passing an array.
If we want to make feature detection simpler, we could consider a different name for this function that takes an array, e.g. contributeArrayToHistogram()
.
Continuing the discussion from #44