✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Чи скомпілюється такий код на
private val menuData = File(“data/tavern-menu-data.txt”)
.readText()
.split(“\n”)
private val menuItems – List(menuData.size) { index ->
val (type, name, price) = menuData[index].split(“,”)
name
}
...
println(“There are several items for sale:”)
println(menuItems)