Transform *Array.size to properties
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ import java.util.HashSet
|
||||
|
||||
fun iarray(vararg a : Int) = a // BUG
|
||||
val IntArray.indices: IntRange get() = IntRange(0, lastIndex())
|
||||
fun IntArray.lastIndex() = size() - 1
|
||||
fun IntArray.lastIndex() = size - 1
|
||||
|
||||
fun box() : String {
|
||||
val vals = iarray(789, 678, 567, 456, 345, 234, 123, 12)
|
||||
|
||||
Reference in New Issue
Block a user