foo [] = 0 foo (x:xs) = (if x `mod` 5 == 0 then 1 else 0) + foo xs
bar n = [(i,j) | i<-[0..2*n], j<-[0..2*n], (i-n)*(i-n)+(j-n)*(j-n) <= n*n ]