- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
class IntIter {
constructor(private i = 0) {}
next() {
type retType = [value: typeof this.i, done: boolean];
if (this.i < 10) {
return <retType>[this.i++, false];
}
return <retType>[this.i, true];
}
}
function main() {
let it = new IntIter();
for (const o of it)
{
print(o);
}
for (const o of "Hello")
{
print(o);
}
}
ASD_77 23.08.2021 22:16 # −24
ASD_77 23.08.2021 22:16 # −24
begmst 23.08.2021 22:17 # +24
ikekyourmom 25.08.2021 19:27 # 0