[Haskell-beginners] another list comprehesion error

Roelof Wobben rwobben at hotmail.com
Thu Jul 21 19:27:20 CEST 2011


hello, 

I know try to make this work.

The user enters a number and the programm calculates all the numbers which are smaller then the number and where x^2+Y^2=Z^2.
So  i Thought this would work.

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 `='

Roelof



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110721/02a8d86d/attachment-0001.htm>


More information about the Beginners mailing list