cantor:: Int->[(Int,Int)] cantor 0 = [(0,1)] cantor n = xs ++ (map g xs) where xs = cantor (n-1) g (a,b) = (a +2*3^(n-1), b+2*3^(n-1))