<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="321306" data-post-id="321306">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wojtekmach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/120/999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wojtekmach
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Hex Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m not sure how to respond to that. Fwiw this quote from docs might be helpful:</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://elixir.hexdocs.pm/1.16.2/Collectable.html">
  <header class="source">

      <a href="https://elixir.hexdocs.pm/1.16.2/Collectable.html" target="_blank" rel="noopener nofollow ugc">elixir.hexdocs.pm</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://elixir.hexdocs.pm/1.16.2/Collectable.html" target="_blank" rel="noopener nofollow ugc">Collectable — Elixir v1.20.2</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>The <a href="https://hexdocs.pm/elixir/1.16.2/Enumerable.html" rel="noopener nofollow ugc"><code>Enumerable</code></a> protocol is useful to take values out of a collection. In order to support a wide range of values, the functions provided by the <a href="https://hexdocs.pm/elixir/1.16.2/Enumerable.html" rel="noopener nofollow ugc"><code>Enumerable</code></a> protocol do not keep shape. For example, passing a map to <a href="https://hexdocs.pm/elixir/1.16.2/Enum.html#map/2" rel="noopener nofollow ugc"><code>Enum.map/2</code></a> always returns a list.</p>
<p>This design is intentional. <a href="https://hexdocs.pm/elixir/1.16.2/Enumerable.html" rel="noopener nofollow ugc"><code>Enumerable</code></a> was designed to support infinite collections, resources and other structures with fixed shape. For example, it doesn’t make sense to insert values into a <a href="https://hexdocs.pm/elixir/1.16.2/Range.html" rel="noopener nofollow ugc"><code>Range</code></a>, as it has a fixed shape where only the range limits and step are stored.</p>
<p>The <a href="https://hexdocs.pm/elixir/1.16.2/Collectable.html#content" rel="noopener nofollow ugc"><code>Collectable</code></a> module was designed to fill the gap left by the <a href="https://hexdocs.pm/elixir/1.16.2/Enumerable.html" rel="noopener nofollow ugc"><code>Enumerable</code></a> protocol.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321306" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/why-do-we-need-to-use-enum-into/62346/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-321306" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321306"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="321308" data-post-id="321308">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just to correct myself: yes, in an Enum.map the Range is a list from an outside perspective. However when seeing the same syntax in<br>
‘slice’ this is different and you do not see it as a ‘shortened version of a list’</p>
<p>So indeed the only answer is compatibility and the output making sense at all times.</p>
<p>Also this is something you only trip over until your head starts seeing it less as ‘map’ and more as ‘map during enumeration’ where the latter more clearly point to a list in return.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321308" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/why-do-we-need-to-use-enum-into/62346/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-321308" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321308"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="321322" data-post-id="321322">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sodapopcan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/120/34668_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sodapopcan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="BartOtten" data-post="9" data-topic="62346">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartotten/48/25440_2.png" class="avatar"> BartOtten:</div>
<blockquote>
<p>Except when the input is a map, there is no guarantee about order in the first place. So this argument doesn’t seem to hold.</p>
</blockquote>
</aside>
<p>I did mean when the input was a map and I was talking about what comes out is ordered <em>from there onward</em>.  It could be different on subsequent runs, so ya, wasn’t really sure if that is useful.  Although:</p>
<aside class="quote no-group" data-username="BartOtten" data-post="9" data-topic="62346">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartotten/48/25440_2.png" class="avatar"> BartOtten:</div>
<blockquote>
<p>For the argument that conversion would take place between steps in a pipe; why would it? Elixir can detect it is in a pipeline and not convert in between as an optimization.</p>
</blockquote>
</aside>
<p>True!  Though that would certainly be surprising behaviour.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321322" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/why-do-we-need-to-use-enum-into/62346/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-321322" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321322"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="321325" data-post-id="321325">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Still, the structure preserving <code>Enum.map</code> would be not possible in case like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">map = %{2 =&gt; 1, 3 =&gt; 7}

Enum.map(map, fn {a, b} -&gt; a + b end)
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321325" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/why-do-we-need-to-use-enum-into/62346/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-321325" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321325"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>