In the following function
function foo(g) a = [g * sqrt(i) for i in 1:4] b = [g * i ^ 2 for i in 1:4] for j in [a, b] j /= sum(j)