Clarify generics example
Resolve #36. Thanks @zachaysan for bringing it to my attention.
This commit is contained in:
parent
775e950be5
commit
e58dee0113
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ proc `+`(a, b: string): string =
|
|||
proc `*`[T](a: T, b: int): T =
|
||||
result = zero
|
||||
for i in 0..b:
|
||||
result = result + a
|
||||
result = result + a # calls `+` from line 3
|
||||
|
||||
assert("a" * 10 == "aaaaaaaaaaa")
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue