Add anonymous function in foreach
Add increment