Skip to content

Instantly share code, notes, and snippets.

@niczky12
Last active December 8, 2022 23:14
Show Gist options
  • Save niczky12/acf490253ecc7bd2973f439b09c94cff to your computer and use it in GitHub Desktop.
Save niczky12/acf490253ecc7bd2973f439b09c94cff to your computer and use it in GitHub Desktop.
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