Skip to content

Commit

Permalink
roman-numberals.md: Don't use uint16 too early (#741)
Browse files Browse the repository at this point in the history
It's only introduced later in the text.

The tests at the current stage all expect int.
  • Loading branch information
dgutov authored Feb 29, 2024
1 parent 5fa95d6 commit fd1fe81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roman-numerals.md
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ var allRomanNumerals = RomanNumerals{
}

// later..
func ConvertToArabic(roman string) uint16 {
var arabic uint16 = 0
func ConvertToArabic(roman string) int {
var arabic = 0

for _, numeral := range allRomanNumerals {
for strings.HasPrefix(roman, numeral.Symbol) {
Expand Down

0 comments on commit fd1fe81

Please sign in to comment.