创建一个匿名函数作为第一个参数 julia> function check(f::Function,n::Int) c=0 for i in 1:n c+=f(i) end return c endcheck (generic function with 1 method)julia> check(8) do x 2*x end72