Dmitri,

And what function can I use to convert from Double to Int (the inverse of
fromIntegral) ?

You should really have a look at the Prelude and the Standard Libraries.

Well, it depends on *how* you want to convert.

truncate :: (RealFrac a, Integral b) => a -> b
round :: (RealFrac a, Integral b) => a -> b
floor :: (RealFrac a, Integral b) => a -> b
ceiling :: (RealFrac a, Integral b) => a -> b

HTH,

Stefan

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to