History of Idiom 43 > diff from v60 to v61
Edit summary for version 61 by OC:
New Obj-C implementation by user [OC]
New Obj-C implementation by user [OC]
↷
Version 60
2020-07-05, 20:32:22
Version 61
2020-10-11, 19:52:49
Idiom #43 Break outer loop
Look for a negative value v in 2D integer matrix m. Print it and stop searching.
Idiom #43 Break outer loop
Look for a negative value v in 2D integer matrix m. Print it and stop searching.
Variables
mVariables
mCode
[m enumerateObjectsUsingBlock:^(NSArray *row, NSUInteger rn, BOOL *stopr) {
[row enumerateObjectsUsingBlock:^(NSNumber *v, NSUInteger cn, BOOL *stopc) {
if (v.intValue<0) {
NSLog(@"found %@ at row:%lu col:%lu",v,rn,cn);
*stopr=*stopc=YES;
return; // to quit the current block immediately
}
}];
}];
Comments bubble