foldLeft<A> method
Apply compose
to all the values of this Map sorted based on order
on their key,
and return the result of combining all the intermediate values.
Implementation
A foldLeft<A>(Order<K> order, A initial, A Function(A acc, V value) compose) {
final sorted = toSortedList(order);
var result = initial;
for (final item in sorted) {
result = compose(result, item.value);
}
return result;
}