" " , , - .
, Continue Passing Style, - , :
let h x = f (g x)
g x, f.
, g . f , .
CPS
let h x next = (g x (fun result -> f result next))
g x, , g . f next .
? , , f (g x)? , g . , , . .
, , , . Whiles, , , , , , , , ,
...
while(condition1) {
statement1;
if(condition2) break;
statement2;
if(condition3) continue;
statement3;
}
return statement3;
...
, , . ,
- ,
- (if-blocks, while-block ..)
.
while . true, . while . false, .
break break . , . , while.
continue , while.
return , , .