diff --git a/day2/part1/main.d b/day2/part1/main.d index a1a3eb1..3c0dfdb 100644 --- a/day2/part1/main.d +++ b/day2/part1/main.d @@ -10,7 +10,7 @@ alias PasswordWithPolicy = Tuple!(ulong, ulong, char, string); ulong findNumberOfValidPasswords(PasswordWithPolicy[] passwords) { - return passwords.filter!(password => password.isPasswordValid).count; + return passwords.filter!isPasswordValid.count; } bool isPasswordValid(PasswordWithPolicy password) diff --git a/day2/part2/main.d b/day2/part2/main.d index 37d8456..048954f 100644 --- a/day2/part2/main.d +++ b/day2/part2/main.d @@ -12,7 +12,7 @@ alias PasswordWithPolicy = Tuple!(size_t, size_t, char, string); ulong findNumberOfValidPasswords(const PasswordWithPolicy[] passwords) { - return passwords.filter!(password => password.isPasswordValid).count; + return passwords.filter!isPasswordValid.count; } bool isPasswordValid(const PasswordWithPolicy password)