Typescript中的惰性迭代器 JavaScript迭代器很烂... const it = Iter . fromArray ( [ 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' ] ) . enumerate ( ) . map ( ( [ k , v ] ) => [ k , v . toUpperCase ( ) ] ) . filter ( ( [ k , v ] ) => k % 2 == 0 ) . map ( ( [ , v ] ) => v ) c