span class="c1"># Initialize function (works in both execution modes)</span>
<span class="n">xy</span><span class="o">.</span><span class="n">eval</span><span class="p">(</span><span class="s2">&quot;$global.square = op(x=0){x*x;};&quot;</span><span class="p">)</span>

<span class="c1"># Call function - variables persist automatically in direct execution</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">xy</span><span class="o">.</span><span class="n">eval</span><span class="p">(