[Haskell-beginners] Re: [Haskell-begin] Maximum of a List?

Daniel Fischer daniel.is.fischer at web.de
Mon Jul 28 09:53:05 EDT 2008

Am Montag, 28. Juli 2008 06:01 schrieb Steve Klabnik:
> First of all, thanks for pointing out the old ghci. I had installed it on a
> lab computer by just googling 'ghci windows' and that was what came up. My
> home machine has the newest one, and is also considerably beefier
> hardware-wise.
> I think you're onto something with the Int/Integer thing....when using a
> type signature of "Integer", "f  1 113383" gives "248" immediately.
> Compiling and running the code with "Integer" types on my home machine
> yields "525".... which Euler says isn't the right answer?

You might want to re-read the question :)
> Also, on the strictness annotations: Do you put them in the type
> declaration? Or in the pattern match on the lhs of the declaration?

You want the strictness annotations in the pattern match. Strictness 
annotations can also appear in data declarations/definitions, but AFAIK not 
in type signatures.


More information about the Beginners mailing list