came across this interesting read from HN:

Modern-C-Lamentations. It really refresh my mind with modern c++.

triples :: Int -> [ (Int, Int, Int) ]
triples = flip take [ (x, y, z) | z <- [1..], x <- [1..z], y <- [x..z], x*x+y*y==z*z]

Now I know one more reason why I love FP better and more productive :)