RosettaCodeData/Task/Loops-Foreach/Objective-C/loops-foreach-2.m

8 lines
146 B
Mathematica
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
NSArray *collect;
//...
NSEnumerator *enm = [collect objectEnumerator];
id i;
while( (i = [enm nextObject]) ) {
// do something with object i
}