
Oke, So I can better goto the next chapter or look for a better book. Im using now Programming in Haskell. My background is that many years I have tried to programm in Delphi. The last years I have tried C and C++ but these were to difficult for me with header files. I could make this with a for next loop and a if then if you like it that way ? Roelof ________________________________
Subject: Re: [Haskell-beginners] another list comprehesion error From: d@vidplace.com Date: Thu, 21 Jul 2011 14:05:14 -0400 CC: beginners@haskell.org To: rwobben@hotmail.com
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 http://panpipesho.com d@vidplace.commailto:d@vidplace.com