[Haskell-beginners] Perfect numbers
haskell at elbeno.com
Fri Oct 3 13:35:19 EDT 2008
On Fri, 2008-10-03 at 09:20 -0800, David Frey wrote:
> (a nice improvement to the perfect number code)
Nice followup David. I knew that there had to be a better way than nub.
On one of my better days I might have spotted that removing duplicates
from sorted lists is O(n) - this is one of the interview questions I
used to use!
Good spot on the predicate too.
More information about the Beginners