[Haskell-cafe] "Natural" polymorphism for n*(n+1)/2

M Douglas McIlroy m.douglas.mcilroy at dartmouth.edu
Wed Dec 16 21:44:19 UTC 2020


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.

Doug


More information about the Haskell-Cafe mailing list