-
Notifications
You must be signed in to change notification settings - Fork 182
Open
Description
If we pass to AverageYearsWorkedAtTheCompany an empty list or a list that contains only employees that still employed, method Average() will throw an exception, as it requires at least one element (
static double AverageYearsWorkedAtTheCompany(List<Employee> employees) |
I've solved it like this: https://github.com/emanuelefirmani/FunctionalProgrammingCSharp/blob/master/FunctorsMonads/WorkPermitCode.cs#L20
Metadata
Metadata
Assignees
Labels
No labels