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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="vic" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/vic/120/11426_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  vic
                    <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>Asdf Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>And found this document,</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://elixir-lang.readthedocs.io/en/latest/technical/scoping.html">
  <header class="source">

      <a href="https://elixir-lang.readthedocs.io/en/latest/technical/scoping.html" target="_blank" rel="noopener nofollow ugc">elixir-lang.readthedocs.io</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://elixir-lang.readthedocs.io/en/latest/technical/scoping.html" target="_blank" rel="noopener nofollow ugc">Scoping Rules in Elixir (and Erlang) — Elixir  documentation</a></h3>



  </article>

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

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

<blockquote>
<p>Any variable in a nested scope whose name coincides with a variable from the surrounding scope will shadow that outer variable. In other words, the variable inside the nested scope temporarily hides the variable from the surrounding scope, but does not affect it in any way.</p>
</blockquote> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="75656" 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/help-assigning-var-inside-anonymous-function-in-macro/13307/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-75656" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="75656"
                     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="75705" data-post-id="75705">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="vic" data-post="10" data-topic="13307" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/vic/48/11426_2.png" class="avatar"> vic:</div>
<blockquote>
<p>So when you write in Elixir:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  a = 1
  a = 2
</code></pre>
<p>I’m just guessing (havent looked at the compiler) that they are actually two different erlang variables (as in erlang you cant re-assign to previously defined variables. It’s just that the compiler keeps track of which is the last a for subsequent expressions I guess.</p>
</blockquote>
</aside>
<p>Yeah for note this gets compiled into something similar to this at the erlang level:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">a$0 = 1
a$1 = 2
</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="75705" 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/help-assigning-var-inside-anonymous-function-in-macro/13307/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-75705" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="75705"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></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>