Converting Int to Integer

36,314

Solution 1

There is a toInteger function you can use.

Solution 2

fromIntegral is a good generic way to convert any Integral value into any other Integeral. But as sth said, toInteger works for the case of converting specifically to an Integer.

Solution 3

also, you can use fromIntegral (since Int is an Integral)

Share:
36,314
marco
Author by

marco

as soon as possible

Updated on July 09, 2022

Comments