sum method

int sum(
  1. int propertyFn(
    1. E e
    )
)

Implementation

int sum(int Function(E e) propertyFn) => fold(0, (p, e) => p + propertyFn(e));