Add typed Iterable/Iterator externs
This commit is contained in:
parent
874f8fc205
commit
ec64d7309c
@ -8,6 +8,18 @@ extern class IllegalArgumentException
|
|||||||
extern class NotImplementedException
|
extern class NotImplementedException
|
||||||
extern class Delegate
|
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).
|
// Built-in math helpers (implemented in host runtime).
|
||||||
extern fun abs(x: Object): Real
|
extern fun abs(x: Object): Real
|
||||||
extern fun ln(x: Object): Real
|
extern fun ln(x: Object): Real
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user