Remove result variable

This commit is contained in:
flaviut 2014-07-17 13:31:19 -04:00
commit 4abd738f6b
2 changed files with 8 additions and 7 deletions

View file

@ -7,9 +7,10 @@ Nimrod supports three different types of variables, `let`, `var`, and `const`. A
``` nimrod
proc getAlphabet(): string =
result = ""
var accm = ""
for letter in 'a'..'z':
result.add(letter)
accm.add(letter)
return accm
# Computed at compilation time
const alphabet = getAlphabet()