Basic implementation of 'for' loops