subtraction method

int subtraction(
  1. List<int> items
)

Implementation

int subtraction(List<int> items) {
  int diff = items.fold(0, (p, c) => c - p);
  return diff;
}