kotlin array swap,extends
array swap(어레이 바꾸기) fun MutableList.swap(index1 : Int, index2 : Int) { val tmp = this[index1] this[index1] = this[index2] this[index2] = tmp } array extends(어레이 크기 확장) fun foo(old: Array ,NEW_STRING:String): Array { val result = old.copyOf(old.size + 1) result[old.size] = NEW_STRING return result }