Day 7, remove useless braces
This commit is contained in:
parent
98276d0854
commit
27631b5043
1 changed files with 1 additions and 1 deletions
2
7.jl
2
7.jl
|
|
@ -8,7 +8,7 @@ for (target,nums) in Iterators.peel.(equations)
|
|||
nums = collect(nums)
|
||||
function testCase(funcs::Tuple, p = 1, sum = 0)::Bool
|
||||
if p > length(nums)
|
||||
return (sum == target)
|
||||
return sum == target
|
||||
end
|
||||
return any(testCase(funcs, p+1, fn(sum, nums[p])) for fn in funcs)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue