News for hackers. Stuff that matters.
Re:What can I do with dynamic typing that I can not do with ... by crntaylor on Friday October 05, 2012 @09:43AM (#4616810)
Small correction; with the most common implementation of Euclid's algorithm the compiler would infer

    gcd :: Integral a => a -> a -> a
since writing Euclid's algorithm requires using `mod` or `rem`, both of which only work for integral types (NB. there are many integral types beside ints, for example polynomials, formal power series and gaussian integers).

The Integral class captures the mathematical idea of a Euclidean domain, which can loosely be thought of as "number systems for which the Euclidean algorithm works".

There are no comments on this comment yet.