[Haskell-beginners] easy question: transform Float -> Int how?

David McBride toad3k at gmail.com
Fri Apr 25 15:03:04 UTC 2014


Use the round function (or ceiling or floor).


On Fri, Apr 25, 2014 at 10:56 AM, John M. Dlugosz
<ngnr63q02 at sneakemail.com>wrote:

> If I have a value of type Float, and I want to pass it (approximately
> rounded) to a function wanting an Int, how do I do that?
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140425/531fd23b/attachment.html>


More information about the Beginners mailing list