On Jul 21, 2011, at 1:27 PM, Roelof Wobben wrote:

roelof :: a -> b -> c -> (a,b,c)
roelof n = [(x y z) | x^2+Y^2=Z^2 <- x<-[1..n], y<- [1..n], z<-[1..n]]

But I get this error : oefening.hs:2:30: parse error on input `='

Hi, Roelof.

This short amount of code has many syntax and semantic errors.    May I suggest that you might benefit from trying to make this function using only normal function application and the basic list functions.    I think you will learn more about Haskell this way.  Personally, i rarely use list comprehensions.  I think they are not very modular.

Also, it might help people to understand your background a little.  This way comments could be better focused.  For instance, which other programming languages do you know?

____________________
David Place   
Owner, Panpipes Ho! LLC