<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; b = (1:3) .&gt; 2;

julia&gt; @show b
b =&gt; [#undef,false,true]
3-element BitArray{1}:
 false
 false
  true"><pre class="notranslate"><code class="notranslate">julia&gt; b = (1:3) .&gt; 2;

julia&gt; @show b
b =&gt; [#undef,false,true]
3-element BitArray{1}:
 false
 false
  true
</code></pre></div>
<p dir="auto">In contrast,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; v = [false,true,false];

julia&gt; @show v
v =&gt; [false,true,false]
3-element Array{Bool,1}:
 false
  true
 false"><pre class="notranslate"><code class="notranslate">julia&gt; v = [false,true,false];

julia&gt; @show v
v =&gt; [false,true,false]
3-element Array{Bool,1}:
 false
  true
 false
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo()
Julia Version 0.3.0-prerelease
Commit 41267f0* (2014-02-09 22:19 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo()
Julia Version 0.3.0-prerelease
Commit 41267f0* (2014-02-09 22:19 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
</code></pre></div>
<p dir="auto">The return value of a function is determined by the function as defined in the last appearance in the code, instead of the value of the function as it is defined at the moment of the evaluation. Take, for instance</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function f()
   g() = 1
   return g()
   g() = 2
end"><pre class="notranslate"><code class="notranslate">function f()
   g() = 1
   return g()
   g() = 2
end
</code></pre></div>
<p dir="auto">When calling <code class="notranslate">f()</code> it returns <code class="notranslate">2</code>, even if the definition of <code class="notranslate">g</code> as the constant function 2 was never reached. I would expect this code to return <code class="notranslate">1</code>.</p>
<p dir="auto"><code class="notranslate">versioninfo()</code></p>
<p dir="auto">Julia Version 1.0.1<br>
Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/0d713926f85dfa3e4e0962215b909b8e47e94f48/hovercard" href="https://github.com/JuliaLang/julia/commit/0d713926f85dfa3e4e0962215b909b8e47e94f48"><tt>0d71392</tt></a> (2018-09-29 19:05 UTC)<br>
Platform Info:<br>
OS: Linux (x86_64-pc-linux-gnu)<br>
CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz<br>
WORD_SIZE: 64<br>
LIBM: libopenlibm<br>
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)</p>