product method

int product()

Implementation

int product() => fold(1, (previousValue, element) => previousValue * element);