Julia Lambda fonctionne
# method 1
x -> x^2 + 2x - 1
# method 2
function (x)
x^2 + 2x - 1
end
# example 1:
julia> map(x -> x^2 + 2x - 1, [1, 3, -1])
3-element Vector{Int64}:
2
14
-2
# example 2:
julia> f = x -> x^2 + 2x - 1; f(3)
14
Pouyan