Skip to content

Commit

Permalink
clarify local in trapezoidal example
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbauer committed Mar 26, 2024
1 parent af51162 commit f704536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/literate/integration/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function trapezoidal_parallel(a, b, N)
n = N ÷ nthreads()
h = (b - a) / N
return tmapreduce(+, 1:nthreads()) do i
local α = a + (i - 1) * n * h
local α = a + (i - 1) * n * h # the local keywords aren't necessary but good practice
local β = α + n * h
trapezoidal(α, β, n; h)
end
Expand Down

0 comments on commit f704536

Please sign in to comment.