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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is a very nice tip, it makes you understand the function and adding a doc to the function even make it better to understand what that function is doing, if you want to use multiple clause function, so you can understand what each function with its own clause is handling<br>
Thank you</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="354187" 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/your-elixir-tips-thread/8055/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-354187" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="354187"
                     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="354313" data-post-id="354313">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mudasobwa" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mudasobwa/120/5298_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mudasobwa
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Cure</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>My fave is <code>__CALLER__</code> struct has a <code>context</code> key which might be used to distingush context of macro invocation (might be <code>:guard</code> when invoked in guards, <code>:match</code> when invoked in matches, or <code>nil</code> otherwise.) Here is the self-explanatory example from <a href="https://github.com/elixir-lang/elixir/blob/v1.18.2/lib/elixir/lib/kernel.ex#L1933-L1940" rel="noopener nofollow ugc"><code>Kernel.or/2</code></a> macro</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  defmacro left or right do
    case __CALLER__.context do
      nil -&gt; build_boolean_check(:or, left, true, right)
      :match -&gt; invalid_match!(:or)
      :guard -&gt; quote(do: :erlang.orelse(unquote(left), unquote(right)))
    end
  end
</code></pre>
<p>It helped me to build the <a href="https://gist.github.com/am-kantox/03325197ff9608dfa83457dbe0d144e9" rel="noopener nofollow ugc"><code>MapSet</code> matchers</a> fwiw.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="354313" 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/your-elixir-tips-thread/8055/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-354313" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="354313"
                     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>