projects
/
advent_of_code_2020.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf510af
)
Simplify a bit the sum (to sum boolean with integer is possible)
author
Greg Burri
<greg.burri@gmail.com>
Wed, 2 Dec 2020 09:04:01 +0000
(10:04 +0100)
committer
Greg Burri
<greg.burri@gmail.com>
Wed, 2 Dec 2020 09:04:01 +0000
(10:04 +0100)
main.jl
patch
|
blob
|
history
diff --git
a/main.jl
b/main.jl
index
0c257ac
..
dd5e7f5
100644
(file)
--- 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
)