
26 Jan
2005
26 Jan
'05
8:06 p.m.
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