Skip to content

Instantly share code, notes, and snippets.

@ChrisRackauckas
Created September 24, 2016 13:40
Show Gist options
  • Save ChrisRackauckas/44a5243a7565b42580dad61ed802624d to your computer and use it in GitHub Desktop.
Save ChrisRackauckas/44a5243a7565b42580dad61ed802624d to your computer and use it in GitHub Desktop.
function do_something(a::Float64, b::Float64)
println("In original do_something")
return a+b
end
function do_all(a::Float64, b::Float64)
result = 0.0
result += do_something(a, b)
result += custom_do_something(a, b)
return result
end
function custom_do_something(a::Float64,b::Float64) end
export do_all, custom_do_something
end # of module
using DoSomething
function DoSomething.custom_do_something(a::Float64, b::Float64)
println("In modified do_something!")
return a*b
end
do_all(1.0, 2.0) # should give 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment