This commit is contained in:
mindfulminun committed 2024-07-20 15:30:48 -05:00
1 parent 9cf0bf415b
commit 71323fc7fd
25 files changed
+186 -94

No files matched your search

+2 -2
View File
@@ -35,9 +35,9 @@ export class Stack<T> implements Iterable<T> {
}
/** The number of elements remaining in the stack */
get length() { return this.#head }
get length(): number { return this.#head }
*[Symbol.iterator]() {
*[Symbol.iterator](): Generator<NonNullable<T>, void, unknown> {
while (this.length !== 0) yield this.pop()!
}
}