summaryrefslogtreecommitdiff
path: root/roman.go
diff options
context:
space:
mode:
Diffstat (limited to 'roman.go')
-rw-r--r--roman.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/roman.go b/roman.go
index 8b99242..afcdbdd 100644
--- a/roman.go
+++ b/roman.go
@@ -1,7 +1,8 @@
+// Package roman numerals
+//
+// Source: https://www.rosettacode.org/wiki/Roman_numerals/Encode#Go
package roman
-// https://www.rosettacode.org/wiki/Roman_numerals/Encode#Go
-
var (
m0 = []string{"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"}
m1 = []string{"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"}
@@ -12,6 +13,7 @@ var (
m6 = []string{"", "M̅", "M̅M̅", "M̅M̅M̅"}
)
+// Roman represents a roman numeral
type Roman int
func (n Roman) String() string {