foo ← {+⌿⍵}
bar ← {2*⍨foo⍵}
foo ⍳3
6
bar ⍳3
36
Can the call to 'foo' in 'bar' to be inlined—either through the editor or a system function—to yield,
{2*⍨{+⌿⍵}⍵}
or similar?
foo ← {+⌿⍵}
bar ← {2*⍨foo⍵}
foo ⍳3
6
bar ⍳3
36
{2*⍨{+⌿⍵}⍵}
foo ← {+⌿⍵}
bar ← {2*⍨foo⍵}
{2*⍨{+⌿⍵}⍵}
{2*⍨+⌿⍵}
{2*⍨+⌿⍵}
{2*⍨foo⍵}
v←'outer' ⍝ outer name "v"
func←{v ⍵} ⍝ fn dereferences name "v"
{v←'inner' ⋄ func ⍵}'v' ⍝ outer fn dereferences outer v
outer v
{v←'inner' ⋄ {v ⍵}⍵}'v' ⍝ inner fn dereferences inner v
inner v
⎕io←1
foo ← {+⌿⍵}
bar ← {2*⍨foo⍵}
foo ⍳3
6
bar ⍳3
36
{2*⍨{+⌿⍵}⍵} ⍳3
36
⎕io←0
foo ⍳3
3
bar ⍳3
9
{2*⍨{+⌿⍵}⍵} ⍳3
9