foundation icon indicating copy to clipboard operation
foundation copied to clipboard

Additive.scale default implementation does not conform to the API

Open ocheron opened this issue 6 years ago • 1 comments

In Basement.Numerical.Additive the class provides a default implementation for scale. But because of the Enum n constraint, it is not general enough and any attempt to use this implementation in an instance will not compile.

ocheron avatar Sep 21 '19 07:09 ocheron

  • Solution A is to change the API to add Enum n
  • Solution B is to change the implementation and do without Enum n, but with Natural conversion
  • Solution C is to change both API and implementation to use (IsNatural n, Enum n, IDivisible n) like in Multiplicative (double-add method)

ocheron avatar Sep 21 '19 07:09 ocheron