Hello!
From the documentation https://docs.julialang.org/en/v1/base/collections/:
get!(d, i) do
i^2
end
Should this not be
get!(d, i) do i
i^2
end
??
Hello!
From the documentation https://docs.julialang.org/en/v1/base/collections/:
get!(d, i) do
i^2
end
Should this not be
get!(d, i) do i
i^2
end
??
The do block here creates an anonymous function that captures the input argument i
. The default function to get!
doesn’t accept arguments.