amaranth
fun <T> mutableListOf(size: Int, init: (Int) -> T): MutableList<T> = if (size == 0) ArrayList() else (0 until size).mapTo(ArrayList(size)) { init(it) }