What would be an ideomatic way to accumulate the r...
# announcements
d
What would be an ideomatic way to accumulate the results of a function call on a list of objects:
Copy code
inline class Baz(val s: Map<String, Any>) { operator fun plus(other: Baz): Baz { ... } }
interface Foo { fun eval(param: String): Baz  }

fun resolve(f: List<Foo>, p: String): Baz = .... // Should merge Baz's maps (logic for the merge already done) from eval(..) on each Foo in f