I want to perform a `reduce` operation but I want my accumulator value to be a different type than t...
b
I want to perform a
reduce
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)
b
Thank you! I knew there had to be one, but I could not figure out wtf it was hahaha