Single-line for and foreach loops