https://kotlinlang.org logo
#language-proposals
Title
# language-proposals
o

orangy

02/07/2017, 8:25 PM
Also, in the initial sample, there is a problem:
Copy code
fun calc(n: Int) = for (i in 1..10) {
    "blah-$i"
   if (i == n) break
  }
So, what if n == 11? Last expression before loop exits is actually an
if
expression, which is
Unit