janvladimirmostert
02/07/2017, 9:39 PMvalue
which sets a value for return, but doesn't break; If value
is not present, treat it like a regular loop with Unit return
So just like with if-else where the compiler can check that you do a value return, the compiler can make sure that you do a value "somevalue"
in the loop, otherwise complain that the variable might not have been initialized.