[Haskell-beginners] Perfect numbers

Jason Dusek jason.dusek at gmail.com
Thu Oct 2 01:54:00 EDT 2008


On Wed, Oct 1, 2008 at 22:25, wman <666wman at gmail.com> wrote:
> First step would probably be using Ints instead of Integers.

  Doesn't seem to make a real difference in GHCi.

--
_jsn


Prelude> do_perfect [1..2000] :: [Integer]
[6,28,496]
it :: [Integer]
(4.22 secs, 169352736 bytes)
Prelude> do_perfect [1..2000] :: [Int]
[6,28,496]
it :: [Int]
(4.23 secs, 153699692 bytes)


More information about the Beginners mailing list