typelevel / algebra

Experimental project to lay out basic algebra type classes
https://typelevel.org/algebra/
Other
378 stars 69 forks source link

fromInt and Ring-like structures. #176

Open johnynek opened 7 years ago

johnynek commented 7 years ago

seems fromNonNegInt only needs sumN(one, n). one is from MultiplicativeMonoid and sumN is from AdditiveMonoid so Rig

fromPosInt would only need Semiring.

We don't have Pos or NonNeg types. We could add them or add unsafe functions.