From: Greg Burri Date: Wed, 2 Dec 2020 09:04:01 +0000 (+0100) Subject: Simplify a bit the sum (to sum boolean with integer is possible) X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=ec7a45222e4d0fa725524ce51161b5f6dda78dfe;p=advent_of_code_2020.git Simplify a bit the sum (to sum boolean with integer is possible) --- diff --git a/main.jl b/main.jl index 0c257ac..dd5e7f5 100644 --- a/main.jl +++ b/main.jl @@ -284,7 +284,7 @@ function nb_of_valid_passwords_part1(passwords :: AbstractArray{Password}) for c in password.p m += c == password.policy_char end - if m ∈ password.policy_range 1 else 0 end + m ∈ password.policy_range end, passwords )