
16 Dec
2020
16 Dec
'20
4:50 p.m.
On Wed, 16 Dec 2020, M Douglas McIlroy wrote:
Some nominally rational functions, e.g n*(n+1)/2, yield integer values for integer arguments. I seek either a way to wrap such a function so it has type Num a => a->a or a convincing argument that it can't be done.
Num will be difficult, but with Integral class you could use 'div'.