-
Notifications
You must be signed in to change notification settings - Fork 2
Lift #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
enhancement
New feature or request
Comments
En fait, cela ne permet toujours pas de faire : F(x) = 2x
H = Lift(F)
H(t) = H(t, t) On a une erreur : julia> H(t) = H(t, t)
ERROR: cannot define function H; it already has a value
Stacktrace:
[1] top-level scope
@ none:0
[2] top-level scope
@ REPL[6]:1 En fait, on peut faire (et on pouvait déjà faire) : F(x) = 2x
H(x, p) = Lift(F)(x, p)
H(t) = H(t, t) |
@ocots agreed. the allowed / forbidden combinations are: julia> f = 1
1
julia> f(x) = 2
ERROR: cannot define function f; it already has a value
Stacktrace:
[1] top-level scope
@ none:0
[2] top-level scope
@ REPL[64]:1
julia> f = x -> 2
control-toolbox/CTBase.jl#123 (generic function with 1 method)
julia> g(x) = 3
g (generic function with 1 method)
julia> g = 4
ERROR: invalid redefinition of constant Main.g
Stacktrace:
[1] top-level scope
@ REPL[67]:1
julia> g(x, y) = 4
g (generic function with 2 methods) A function (not a functional value, aka lambda) can have several definitions (multiple dispatch). Regarding Poisson, not clear from the PR whether we can completely bypass the |
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A lift of a function should return a function.
The text was updated successfully, but these errors were encountered: