operation but I want my accumulator value to be a different type than the types and I want to provide my initial value. Here’s an example using Int and String
Copy code
listOf("1", "10", "100", "1000").reduce(withInitial = 0) { acc: Int, current: String ->
acc + current.toInt()
} // should result in Int(1111)