haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] How to decide if a number is an integer?

Subject: Re: [Haskell-cafe] How to decide if a number is an integer?
From: Magicloud Magiclouds
Date: Tue, 29 Sep 2009 14:35:08 +0800
It never matches to (_, 0.0)....
I mean
case properFraction l of
  (_, 0) -> l
  _ -> 0 -- always goes here.

On Tue, Sep 29, 2009 at 2:18 PM, Jimmy Hartzell <jim@xxxxxxxxxxxxxxxxxx> wrote:
> Use properFraction:
> http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3AproperFraction
>
>> Hi,
>> Â In other weak-type language, `round i == i` would work. But in
>> haskell, what should I do? Thanks.
>> --
>> çåååææè
>> åéåééäé
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe@xxxxxxxxxxx
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
>



-- 
çåååææè
åéåééäé
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>