Last active
December 8, 2022 23:14
-
-
Save niczky12/acf490253ecc7bd2973f439b09c94cff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Base.Threads | |
function sumupto(fun, n) | |
s = 0 | |
Threads.@threads for i in 1:n | |
s += fun(i) | |
end | |
s | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment