I see. Is there anyway to accomplishing what I want: I want to be able to pass a digit (“1” in the case above) to the function bar, use that digit “X” to capture the variable myvarX in foo(), and use it to compute stuff within bar()?
(I realize I can just send in the variable itself, but I’m trying to understand the Julia language.)