summaryrefslogtreecommitdiff
path: root/95-99/95.hs
diff options
context:
space:
mode:
Diffstat (limited to '95-99/95.hs')
-rw-r--r--95-99/95.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/95-99/95.hs b/95-99/95.hs
new file mode 100644
index 0000000..4a6ff49
--- /dev/null
+++ b/95-99/95.hs
@@ -0,0 +1,5 @@
+fullWords :: Int -> String
+
+fullWords x = if x < 10 then s else fullWords (x `quot` 10) ++ "-" ++ s
+ where s = ["zero", "one", "two", "three", "four",
+ "five", "six", "seven", "eight", "nine"]!!(x `mod` 10)