struct MM
a::Int
end
function (m::MM)(x::Int)
MM(m.a+x)
end
m = MM(11)
m(5) # what is the typeof the function called here?
What really happens when I say m(5), is there a function like apply(m,5) somewhere?
Thanks
struct MM
a::Int
end
function (m::MM)(x::Int)
MM(m.a+x)
end
m = MM(11)
m(5) # what is the typeof the function called here?
What really happens when I say m(5), is there a function like apply(m,5) somewhere?
Thanks
No. The type of the callee is MM
. There’s no Function
involved.