summaryrefslogblamecommitdiff
path: root/46-50/49.hs
blob: afe25adca21769639df03c4983b491952c2de337 (plain) (tree)
1
2
3
4



                                                                                   
gray :: Int -> [String]

gray 0 = [""]
gray n = (map ('0':) last) ++ (map ('1':) $ reverse last) where last = gray (n - 1)