<p dir="auto">I discovered this fact while working with something like the following:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; da = distribute(1:10)
10-element DArray{Int64,1,UnitRange{Int64}}:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10

julia&gt; [println((myid(), x)) for x in da];
(1,1)
(1,2)
(1,3)
(1,4)
(1,5)
(1,6)
(1,7)
(1,8)
(1,9)
(1,10)

julia&gt; map((x) -&gt; println((myid(), x)), da);
    From worker 2:  (2,1)
    From worker 3:  (3,6)
    From worker 2:  (2,2)
    From worker 2:  (2,3)
    From worker 2:  (2,4)
    From worker 2:  (2,5)
    From worker 3:  (3,7)
    From worker 3:  (3,8)
    From worker 3:  (3,9)
    From worker 3:  (3,10)"><pre class="notranslate">julia<span class="pl-k">&gt;</span> da <span class="pl-k">=</span> <span class="pl-c1">distribute</span>(<span class="pl-c1">1</span><span class="pl-k">:</span><span class="pl-c1">10</span>)
<span class="pl-c1">10</span><span class="pl-k">-</span>element DArray{Int64,<span class="pl-c1">1</span>,UnitRange{Int64}}<span class="pl-k">:</span>
  <span class="pl-c1">1</span>
  <span class="pl-c1">2</span>
  <span class="pl-c1">3</span>
  <span class="pl-c1">4</span>
  <span class="pl-c1">5</span>
  <span class="pl-c1">6</span>
  <span class="pl-c1">7</span>
  <span class="pl-c1">8</span>
  <span class="pl-c1">9</span>
 <span class="pl-c1">10</span>

julia<span class="pl-k">&gt;</span> [<span class="pl-c1">println</span>((<span class="pl-c1">myid</span>(), x)) <span class="pl-k">for</span> x <span class="pl-k">in</span> da];
(<span class="pl-c1">1</span>,<span class="pl-c1">1</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">2</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">3</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">4</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">5</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">6</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">7</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">8</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">9</span>)
(<span class="pl-c1">1</span>,<span class="pl-c1">10</span>)

julia<span class="pl-k">&gt;</span> <span class="pl-c1">map</span>((x) <span class="pl-k">-&gt;</span> <span class="pl-c1">println</span>((<span class="pl-c1">myid</span>(), x)), da);
    From worker <span class="pl-c1">2</span><span class="pl-k">:</span>  (<span class="pl-c1">2</span>,<span class="pl-c1">1</span>)
    From worker <span class="pl-c1">3</span><span class="pl-k">:</span>  (<span class="pl-c1">3</span>,<span class="pl-c1">6</span>)
    From worker <span class="pl-c1">2</span><span class="pl-k">:</span>  (<span class="pl-c1">2</span>,<span class="pl-c1">2</span>)
    From worker <span class="pl-c1">2</span><span class="pl-k">:</span>  (<span class="pl-c1">2</span>,<span class="pl-c1">3</span>)
    From worker <span class="pl-c1">2</span><span class="pl-k">:</span>  (<span class="pl-c1">2</span>,<span class="pl-c1">4</span>)
    From worker <span class="pl-c1">2</span><span class="pl-k">:</span>  (<span class="pl-c1">2</span>,<span class="pl-c1">5</span>)
    From worker <span class="pl-c1">3</span><span class="pl-k">:</span>  (<span class="pl-c1">3</span>,<span class="pl-c1">7</span>)
    From worker <span class="pl-c1">3</span><span class="pl-k">:</span>  (<span class="pl-c1">3</span>,<span class="pl-c1">8</span>)
    From worker <span class="pl-c1">3</span><span class="pl-k">:</span>  (<span class="pl-c1">3</span>,<span class="pl-c1">9</span>)
    From worker <span class="pl-c1">3</span><span class="pl-k">:</span>  (<span class="pl-c1">3</span>,<span class="pl-c1">10</span>)</pre></div>
<p dir="auto">Which raises the obvious question: why don't array comprehensions simply desugar into <code class="notranslate">map</code>s? This smells of bad language design that apparently identical language features have subtly different semantics.</p>
<p dir="auto">typeof(map(x -&gt; x^2, [1,2,3])) = Array{int64,1}</p>
<p dir="auto">typeof([ x^2 | x=[1,2,3]) = Array{Any, 1}</p>
<p dir="auto">It seems odd that the comprehension loses the type information, while map retains it.</p>