Merge pull request #9805 from pacien/181126-list-append

add SinglyLinkedList.append procs
This commit is contained in:
Andreas Rumpf
2018-12-11 22:18:40 +01:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@@ -10,7 +10,8 @@ const
block SinglyLinkedListTest1:
var L: SinglyLinkedList[int]
for d in items(data): L.prepend(d)
assert($L == "[6, 5, 4, 3, 2, 1]")
for d in items(data): L.append(d)
assert($L == "[6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6]")
assert(4 in L)