Int#downto

This commit is contained in:
Pavel V. Talanov
2012-07-20 12:38:07 +04:00
parent ad94786555
commit 8eb0fb31ca
4 changed files with 21 additions and 1 deletions
@@ -0,0 +1,11 @@
package foo
import java.util.ArrayList
fun box() : Boolean {
var elems = ArrayList<Int>()
for (i in 4 downto 0) {
elems.add(i)
}
return elems[0] == 4 && elems[1] == 3 && elems[2] == 2 && elems[3] == 1 && elems[4] == 0
}