7 lines
137 B
TypeScript
7 lines
137 B
TypeScript
export function* iter(list: any[]){
|
|
let index = 0;
|
|
while(true){
|
|
yield list[index % list.length];
|
|
index++;
|
|
}
|
|
} |