The same is true with Julia:
julia> a = 1
1
julia> function foo(x) x+ a end
foo (generic function with 1 method)
julia> foo(2)
3
julia> a = 2
2
julia> foo(2)
4
julia> a = 1
1
julia> function foo(x) x+ a end
foo (generic function with 1 method)
julia> foo(2)
3
julia> a = 2
2
julia> foo(2)
4
No comments yet.