* Concatenates another array for iterating. Empty arrays are ignored. * This operation can be safely performed during ongoing ConsArray * iteration. * * @param {Array} arr Array to concatenate.
(arr)
| 50 | * @param {Array} arr Array to concatenate. |
| 51 | */ |
| 52 | concat(arr) { |
| 53 | if (arr.length > 0) { |
| 54 | this.tail_.data = arr; |
| 55 | this.tail_ = this.tail_.next = new ConsArrayCell(null, null); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Whether the end of iteration is reached. |
no outgoing calls