Created
September 24, 2016 13:40
-
-
Save ChrisRackauckas/44a5243a7565b42580dad61ed802624d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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