grayify :: (Ord a, Eq a) => [a] -> [a]
grayify xs = map snd $ sortBy (compare `on` fst) $ zipWith (\n e -> (binary n,e)) ([0..] :: [Int]) xs
grayify :: (Ord a, Eq a) => [a] -> [a]
grayify xs = map snd $ sortBy (compare `on` fst) $ zipWith (\n e -> (binary n,e)) ([0..] :: [Int]) xs
grayify xs = map snd $ sortBy (compare `on` fst) $ zipWith (\n e -> (binary n,e)) ([0..] :: [Int]) xs