aggregate
inline fun <T> Iterable<KotlinResult<T>>.aggregate(reduce: (List<Throwable>) -> Throwable = { it.first() }): KotlinResult<List<T>>
If all results in the Iterable are success,
returns
a new nz.adjmunro.outcome.result.KotlinResult success, with a List of each element's encapsulated value.If any results in the Iterable are failure,
returns
a new nz.adjmunro.outcome.result.KotlinResult failure with the result of the reduce function.