diff options
author | c-blake <c-blake@users.noreply.github.com> | 2020-11-04 10:56:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:56:22 +0100 |
commit | f17555770e816580b475674be23458da51b10dfd (patch) | |
tree | 5e6dbb605c693811762224e8866363ed3c15bcf0 /tests/generics/tbintree.nim | |
parent | 7d640e0943679a772f9595ef3be56fe2158b0912 (diff) | |
download | Nim-f17555770e816580b475674be23458da51b10dfd.tar.gz |
Clarify the sense in which Nim supports recursive iterators in the (#15834)
manual, the tutorial, and the `tbintree` test.
Diffstat (limited to 'tests/generics/tbintree.nim')
-rw-r--r-- | tests/generics/tbintree.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/generics/tbintree.nim b/tests/generics/tbintree.nim index a1a13c7b5..83f14406b 100644 --- a/tests/generics/tbintree.nim +++ b/tests/generics/tbintree.nim @@ -55,8 +55,8 @@ proc find*[Ty2](b: PBinaryTree[Ty2], data: Ty2): bool = iterator preorder*[T](root: PBinaryTree[T]): T = # Preorder traversal of a binary tree. - # Since recursive iterators are not yet implemented, - # this uses an explicit stack: + # This uses an explicit stack (which is more efficient than + # a recursive iterator factory). var stack: seq[PBinaryTree[T]] = @[root] while stack.len > 0: var n = stack.pop() |