Are there any languages that support 'subloop' constructs? Like I want to inherit the state set by the initializers of the outer loop and just continue working with the same parameters (optionally a new conditional for exiting this subloop). Example:
for(int i = 0; i++; i < size){
if(array[i] > 0){
edgeDetectList.add(i);
subloop(array[i] > 0){
// I guess in this example I don't need any particular logic here
// But at the end of this loop, i should be incremented and checked against size
// If i < size is hit before this inner loop exits, it should directly exit the outer loop, hitting the print statement and skipping the following list addition
}
edgeDetectList.add(i);
}
}
print("done");