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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="c13e" data-post="81" data-topic="44773">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/c13e/48/7761_2.png" class="avatar"> c13e:</div>
<blockquote>
<p>The case for <code>for reduce</code> doesn’t seem very compelling. AFAIK the same functionality can be accomplished with current <code>:reduce</code> option and it’s not clear to me what advantage the new syntax brings in this case?</p>
</blockquote>
</aside>
<p>If we introduce for-let, then I think we should have for-reduce for consistency and deprecate the :reduce option. The proposal explains why having it at the beginning allows more possibilities, but other than that they are quite close.</p>
<aside class="quote no-group" data-username="c13e" data-post="81" data-topic="44773">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/c13e/48/7761_2.png" class="avatar"> c13e:</div>
<blockquote>
<p>One of the great things about Elixir is the focus on explicitness and I’m a bit concerned we would be giving up some ground here with some aspects of the proposed solution</p>
</blockquote>
</aside>
<p>The tuple contract is how it works with map_reduce and that is what we are trying to mirror here. We could try to steer away from it, but then we venture further into unknown territory, which was more generally disliked in previous proposals. The comprehension error won’t catch false positives though, unless we have a type system.</p>
<blockquote>
<p><strong>You can re-bind the <code>let</code> variables in each iteration, and at the end <code>for</code> scoops up the final values and returns them in a map.</strong></p>
</blockquote>
<p>This was actually my first proposal but it was generally disliked. You can see the elixir-lang-core mailing list for more discussion on that. I would link but I am currently on my phone.</p>
<p>—-</p>
<p>My thoughts on this topic have changed several times but right now I am closer to <code>for_let</code> and <code>for_reduce</code> than <code>for let</code>. The reason is simple: different return types should have different functions.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237261" data-batch-url="/posts/batch_likers">
                        10
                      </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/introducing-for-let-and-for-reduce/44773/83">Post #82</a>
	                </div>
	            </div>
              <div id="likers-container-237261" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237261"
                     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 #82"></div>
  </section>
</div>
    <div class="postbit" id="237263" data-post-id="237263">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="83" data-topic="44773">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>My thoughts on this topic have changed several times but right now I am closer to <code>for_let</code> and <code>for_reduce</code> than <code>for let</code>. The reason is simple: different return types should have different functions.</p>
</blockquote>
</aside>
<p>This is great to hear <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>! One of the things I was reluctant about in the proposal is that this “modal” behavior doesn’t exist in other parts of the language like many others mentioned, so it makes total sense to have different expectations about the function in this context…</p>
<p>However, now I understand (based on your previous comment about the special forms), the ideal solution would be adding no new keywords. So, I’m wondering after reading <a class="mention" href="/u/soup" rel="nofollow">@soup</a>’s comment if something like <code>try let</code> would make sense in Elixir. Does the proposed concept of ‘qualifier’ works in other parts of the language?</p>
<p>Another thing, have you played with the idea of combining the behavior of both for-map and for-reduce in one place? Functions like <code>Enum.chunk_while</code> and <code>Enum.group_by</code> where you control how the return values are dealt with keep coming to mind when I think about the problem at hand.</p>
<p>PS.: I think the point of Phoenix already using <code>let</code> in heex kinda starts validating the proposal to me (out of practicality mostly).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237263" 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/introducing-for-let-and-for-reduce/44773/84">Post #83</a>
	                </div>
	            </div>
              <div id="likers-container-237263" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237263"
                     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 #83"></div>
  </section>
</div>
    <div class="postbit" id="237265" data-post-id="237265">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>The tuple contract is how it works with map_reduce and that is what we are trying to mirror here.</p>
</blockquote>
<p>Great point <img src="https://forum.elixirforum.com/images/emoji/apple/+1.png?v=15" title=":+1:" class="emoji" alt=":+1:" loading="lazy" width="20" height="20"> Makes sense to me.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237265" 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/introducing-for-let-and-for-reduce/44773/85">Post #84</a>
	                </div>
	            </div>
              <div id="likers-container-237265" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237265"
                     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 #84"></div>
  </section>
</div>
    <div class="postbit" id="237276" data-post-id="237276">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<pre data-code-wrap="elixir"><code class="lang-elixir">for sum := 0, count := 0, i &lt;- [1, 2, 3] do
  sum = sum + i
  count = count + 1
  {sum, count}
end
</code></pre>
<p>This keeps the shape of the for:</p>
<p>Before:</p>
<blockquote>
<ul>
<li>Generators are <code>&lt;-</code></li>
<li>Filters are <code>=</code> or function calls, or basically anything that returns a bool value</li>
</ul>
</blockquote>
<p>After:</p>
<blockquote>
<ul>
<li>Initializers are <code>:=</code></li>
<li>Generators are <code>&lt;-</code></li>
<li>Filters are <code>=</code> or function calls, or basically anything that returns a bool value</li>
</ul>
</blockquote>
<p>Upside:</p>
<ul>
<li>“Shape of things” is preserved</li>
<li>Each separate “thing” has it’s own operator (<code>:=</code>, <code>&lt;-</code>)</li>
</ul>
<p>Downside:</p>
<ul>
<li>probably less readable</li>
<li>introduces a new operator that doesn’t exist in other places in the language</li>
</ul>
<p>(Another downside that many have already mentioned this stops being a <code>Enum.map</code>, and becomes either a <code>map</code> or a <code>reduce</code> depending on whether or not we have initial values)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237276" data-batch-url="/posts/batch_likers">
                        5
                      </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/introducing-for-let-and-for-reduce/44773/86">Post #85</a>
	                </div>
	            </div>
              <div id="likers-container-237276" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237276"
                     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 #85"></div>
  </section>
</div>
    <div class="postbit" id="237284" data-post-id="237284">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Having separate names does seem to allow for a lot of freedom. It makes it easy to document the different types of comprehensions and easy to google them when you come across them for the first time.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237284" 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/introducing-for-let-and-for-reduce/44773/87">Post #86</a>
	                </div>
	            </div>
              <div id="likers-container-237284" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237284"
                     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 #86"></div>
  </section>
</div>
    <div class="postbit" id="237327" data-post-id="237327">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="danj" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  danj
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I do like <code>for</code> alone, this being a single unusual special form under which all this functionality groups. Maybe it’s odd to have options that alter the return form, but breaking them up into for_map and for_reduce may not add a stitch of clarity to the real problem.</p>
<p>The initial binding is the sticky bit because it’s also controlling the result shape. How about something explicit <code>for returns {:acc, {sum=0,count=0}}…</code> and <code>for returns {sum=0,count=0}…</code></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237327" data-batch-url="/posts/batch_likers">
                        2
                      </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/introducing-for-let-and-for-reduce/44773/88">Post #87</a>
	                </div>
	            </div>
              <div id="likers-container-237327" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237327"
                     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 #87"></div>
  </section>
</div>
    <div class="postbit" id="237337" data-post-id="237337">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Another +1 vote for using <code>init</code> in some way (with or without parens).</p>
<p>For many people coming from other languages, <code>let</code> has so much baggage around mutability that it may be more of a hindrance than a help.</p>
<p>A couple of additional options that feel directionally Elixir-ish:</p>
<p><strong>Combining <code>for</code> and <code>with</code></strong><br>
While I generally disagree with including additional forms like <code>for_reduce</code> or <code>for_let</code>, there could be an opportunity to mix <code>for</code> and <code>with</code> on this occasion? My mental framework has <code>with</code> reading as something like “assuming (given conditions succeed) do this…”. Combining <code>for</code> and <code>with</code> (either syntactically via punctuation/blocks or literally as <code>for_with</code>) would read something like “assuming we’re able to initialize these variables, then execute this comprehension”.</p>
<p><strong>Leveraging guard-like syntax</strong><br>
We already have a way to say “perform this secondary check/action when doing this logic block”. The <code>when</code> syntax does this with guards. Why not have something similar for comprehensions? Could also combine the above <code>with</code> logic, or use an aforementioned option as well (<code>init</code> remains my personal favorite):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">for i &lt;- [1,2,3] with {sum, count} &lt;- {0,0} do...
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">for i &lt;- [1,2,3] init {sum, count} &lt;- {0,0} do...
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">for i &lt;- [1,2,3] let {sum, count} &lt;- {0,0} do...
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">for i &lt;- [1,2,3] first {sum, count} &lt;- {0,0} do...
</code></pre>
<p>Yes, there is some overloading here, but it’s not <em>so</em> foreign.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237337" 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/introducing-for-let-and-for-reduce/44773/89">Post #88</a>
	                </div>
	            </div>
              <div id="likers-container-237337" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237337"
                     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 #88"></div>
  </section>
</div>
    <div class="postbit" id="237339" data-post-id="237339">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="danj" data-post="88" data-topic="44773">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/db5fbb/48.png" class="avatar"> danj:</div>
<blockquote>
<p>The initial binding is the sticky bit because it’s also controlling the result shape. How about something explicit <code>for returns {:acc, {sum=0,count=0}}…</code> and <code>for returns {sum=0,count=0}…</code></p>
</blockquote>
</aside>
<p>This is very interesting! I like how it keeps everything under the <code>for</code> namespace of special forms, plus it makes the return value very clear (and even custom – if you want the “reduce” part of <code>map_reduce</code> before the “map” part, you can do that). It also leaves open future extensions such as <code>async</code> or even filters on accumulated values before generators are specified.<br>
The one difference I suggest is that <code>:map</code> (or <code>:values</code>?) be used in place of where you used <code>:acc</code> since <code>sum</code> and <code>count</code> are accumulation variables (the <code>reduce</code> part of <code>map_reduce</code>).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237339" 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/introducing-for-let-and-for-reduce/44773/90">Post #89</a>
	                </div>
	            </div>
              <div id="likers-container-237339" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237339"
                     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 #89"></div>
  </section>
</div>
    <div class="postbit" id="237343" data-post-id="237343">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="derekbrown" data-post="89" data-topic="44773">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/derekbrown/48/19284_2.png" class="avatar"> derekbrown:</div>
<blockquote>
<p>We already have a way to say “perform this secondary check/action when doing this logic block”. The <code>when</code> syntax does this with guards. Why not have something similar for comprehensions?</p>
</blockquote>
</aside>
<p>I think the idea is good, but it suffers from the same “problems” as <code>for let</code> and <code>for reduce</code> - syntax that isn’t available outside of this scope. If specifying the ‘qualifiers’ at the end was feasible, I’d rather leave it like the other <code>:into</code>, and <code>:reduce</code> options. Also, the similarities with the guard’s syntax seem only superficial to me.</p>
<aside class="quote no-group" data-username="danj" data-post="88" data-topic="44773">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/db5fbb/48.png" class="avatar"> danj:</div>
<blockquote>
<p>The initial binding is the sticky bit because it’s also controlling the result shape. How about something explicit <code>for returns {:acc, {sum=0,count=0}}…</code> and <code>for returns {sum=0,count=0}…</code></p>
</blockquote>
</aside>
<p>This is also interesting, but if that were the case, I’d  prefer if we could retain compatibility with the <code>Enum.chunk_while/4</code> return structure or something (by specifying how the results are going to be handled). However, I don’t think supporting distinct result types in <code>for</code> would be a good idea if we care about ergonomics, so I’d rather have another keyword in place if that was the case (different expectations for different functions).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237343" 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/introducing-for-let-and-for-reduce/44773/91">Post #90</a>
	                </div>
	            </div>
              <div id="likers-container-237343" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237343"
                     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 #90"></div>
  </section>
</div>
    <div class="postbit" id="237344" data-post-id="237344">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>I think the idea is good, but it suffers from the same “problems” as <code>for let</code> and <code>for reduce</code> - syntax that isn’t available outside of this scope.</p>
</blockquote>
<p>There’s no reason why an <code>init</code> “guard” couldn’t be used in other scopes. I could certainly see it being useful outside of comprehensions.</p>
<p>I’ll refrain from responding to the “superficial” statement.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="237344" 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/introducing-for-let-and-for-reduce/44773/92">Post #91</a>
	                </div>
	            </div>
              <div id="likers-container-237344" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="237344"
                     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 #91"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/44773/load_more?page=10">Load more posts (33 remaining)</a>
</div></template></turbo-stream>