Tried the following way and it worked. Wonder if anyone would comment on
its properness?
------------------------
function f1(i::Int)
x = 10. * i
println(x)
nothing
end
function f2(i::Int)
x = 5. * i
println(x)
nothing
end
function func(ff)
ff(4)
end
ff(i::Int) = f2(i::Int)
func(ff)
On 06/09/2014 01:34 PM, cnbiz850 wrote:
Say I want to pass the following function f1 to a function called f2
as an argument. What is exactly the type of function f1? How do I
define f2's arguments?
function f1(i::Int, x::Float)
x = 10. * i
nothing
end
function f2(f1::???)
end