summaryrefslogtreecommitdiff
path: root/46-50/49.hs
diff options
context:
space:
mode:
Diffstat (limited to '46-50/49.hs')
-rw-r--r--46-50/49.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/46-50/49.hs b/46-50/49.hs
new file mode 100644
index 0000000..afe25ad
--- /dev/null
+++ b/46-50/49.hs
@@ -0,0 +1,4 @@
+gray :: Int -> [String]
+
+gray 0 = [""]
+gray n = (map ('0':) last) ++ (map ('1':) $ reverse last) where last = gray (n - 1)