import kotlin.test.* import kotlin.comparisons.* fun box() { expect("1234") { val list = listOf("1", "2", "3", "4") list.reduce { a, b -> a + b } } assertFailsWith { arrayListOf().reduce { a, b -> a + b } } }