Swift has a BinaryInteger/isMultiple(of:) method, and I don't see a great reason to exclude it from this project. I suppose the difficult part is deciding what to with infinite values. Some factorizations are possible, even for infinite values, but I don't think it's possible in general. I might limit non-optional results to Finite<T> and FiniteInteger. Hm.
Swift has a
BinaryInteger/isMultiple(of:)
method, and I don't see a great reason to exclude it from this project. I suppose the difficult part is deciding what to with infinite values. Some factorizations are possible, even for infinite values, but I don't think it's possible in general. I might limit non-optional results toFinite<T>
andFiniteInteger
. Hm.