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)
|
nums = collect(nums)
|
||||||
function testCase(funcs::Tuple, p = 1, sum = 0)::Bool
|
function testCase(funcs::Tuple, p = 1, sum = 0)::Bool
|
||||||
if p > length(nums)
|
if p > length(nums)
|
||||||
return (sum == target)
|
return sum == target
|
||||||
end
|
end
|
||||||
return any(testCase(funcs, p+1, fn(sum, nums[p])) for fn in funcs)
|
return any(testCase(funcs, p+1, fn(sum, nums[p])) for fn in funcs)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue