Closed KStasi closed 4 years ago
According to https://ligolang.org/docs/language-basics/loops/#while-loop
⚠️ The current PascaLIGO while loop has semantics that have diverged from other LIGO syntaxes. The goal of LIGO is that the various syntaxes express the same semantics, so this will be corrected in future versions. For details on how loops will likely work after refactoring, see the CameLIGO tab of this example.
So ReasonLIGO supports both break
and continue
operation no problem.
let aux = (i: int): (bool, int) =>
if (i < 100) {
continue(i + 1);
} else {
stop(i);
};
Maybe we should consider switching to Reason dialect?
break
was totally removed from every dialect of LIGO.
We may failwith
on break
for better or for worse
break
should stop loop. It doesn't have a direct analog in Ligo so some another solution should be proposed