Lets say I have this kind of code. How could I access variable M in 
compute() function? 
function algoX(data)
  M,N = size(data)
  param = 20

  computeSomething()
end

export
function computeSomething()
  a = compute()
end

function compute()
  # Needs variable M
  M * param
end

I do not want to nest all functions, because then I wont be able to export 
them for testing. Also I do not want to pass variable M to 
computeSomething() and then pass to compute(). What should I do?


Reply via email to