Created
December 12, 2017 22:02
-
-
Save dataPulverizer/ad8f788be14aaf20e8a93d5c00631fda to your computer and use it in GitHub Desktop.
Delegates in Julia
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
# Delegates in Julia | |
function makeFun(x::Float64) | |
return y::Float64 -> y^2 + x^2 | |
end | |
ff = makeFun(4.0) | |
# (generic function with 1 method) | |
ff(5.0) | |
# 41.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment