Add typed Iterable/Iterator externs

This commit is contained in:
sergeych committed 2026-02-04 00:01:29 +03:00
1 parent 874f8fc205
commit ec64d7309c
1 file changed
+12
+12
View File
@@ -8,6 +8,18 @@ extern class IllegalArgumentException
extern class NotImplementedException
extern class Delegate
extern class Iterable<T> {
fun iterator(): Iterator<T>
fun toList(): List<T>
}
extern class Iterator<T> {
fun hasNext(): Bool
fun next(): T
fun cancelIteration(): Void
fun toList(): List<T>
}
// Built-in math helpers (implemented in host runtime).
extern fun abs(x: Object): Real
extern fun ln(x: Object): Real