foo [] = False foo (x:xs) = x < 0 || foo xs
bar n = [(i,j) | i<-[1..n], j<-[i..n], i*j `mod` 8 == 0 ]