es = [(a, d) | a <- [1..], d <- [2..2*a], isPerfectSquare (a*a+d*d)]

accumulate acc ((a, d):ls) = (a, 
candidates :: [(Int, Int)]
candidates = [(a, d) | a <- [1..], d <- [2..2*a], isPerfectSquare (a*a+d*d)]
candidates = [(a, d) | a <- [1..], d <- [2..2*a], isPerfectSquare (a*a+d*d)]