Implement async for and foreach loops with tests