Skip to content

Commit

Permalink
attempt to appease vint 2
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Nov 8, 2024
1 parent 569fd86 commit 3d34af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/practice/grains/.meta/example.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function! StringAdd(a, b) abort
let carry = 0

for i in range(len - 1, 0, -1)
let c = carry + a->strpart(i, 1)->str2nr() + b->strpart(i, 1)->str2nr()
let c = carry + (a->strpart(i, 1)->str2nr()) + (b->strpart(i, 1)->str2nr())
let result = $"{c % 10}{result}"
let carry = c / 10
endfor
Expand Down

0 comments on commit 3d34af9

Please sign in to comment.