On Tue, 13 Mar 2007 21:41:00 +0100, Dave Hinton <[EMAIL PROTECTED]> wrote:
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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe