Insert at end of list
(value: T)
| 706 | |
| 707 | /** Insert at end of list */ |
| 708 | push(value: T) { |
| 709 | this.count += 1; |
| 710 | const newNode: ListNode<T> = { |
| 711 | next: this.head as HeadNode<T>, |
| 712 | prev: this.head.prev as ListNode<T>, |
| 713 | value |
| 714 | }; |
| 715 | this.head.prev.next = newNode; |
| 716 | this.head.prev = newNode; |
| 717 | } |
| 718 | |
| 719 | /** Inserts every item inside an iterable instead of the iterable itself */ |
| 720 | pushMany(iterable: Iterable<T>) { |
no outgoing calls