bdawg.io
08/01/2018, 9:34 PMreduce
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 listOf("1", "10", "100", "1000").reduce(withInitial = 0) { acc: Int, current: String ->
acc + current.toInt()
} // should result in Int(1111)
ilya.gorbunov
08/01/2018, 9:41 PMbdawg.io
08/01/2018, 9:42 PM