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: https://git.euphorik.ch/?a=commitdiff_plain;h=c8b11e72b64719ed0530f1c0fa7cb7c5bbf8a877;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 )