Added foreach() function macro