
13 Mar
2007
13 Mar
'07
4:53 p.m.
On Tue, 13 Mar 2007 21:41:00 +0100, Dave Hinton
how do I coerce a value from being an Int to being a Double?
calc :: Int -> Double -> Double calc count weight = count * weight
Use: calc count weight = fromIntegral count * weight If you want an Int result, use: calc count weight = count * round weight -- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433