()
| 695 | } |
| 696 | |
| 697 | private *nodes(): Generator<ListNode<T>, void, void> { |
| 698 | let ptr: HeadNode<T> | ListNode<T> | EmptyNode = this.head.next; |
| 699 | while (ptr !== this.head) { |
| 700 | // Save next before yielding so that we make removing within iteration safe |
| 701 | const { next } = ptr as ListNode<T>; |
| 702 | yield ptr as ListNode<T>; |
| 703 | ptr = next; |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | /** Insert at end of list */ |
| 708 | push(value: T) { |
no outgoing calls
no test coverage detected