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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="NobbZ" data-post="7" data-topic="25924">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nobbz/48/27235_2.png" class="avatar"> NobbZ:</div>
<blockquote>
<p>The second (<code>acc</code>) contains the individual steps of the final handshake.</p>
</blockquote>
</aside>
<p>Nice solution, more readable, IMHO. One question though, - what did you mean under</p>
<blockquote>
<p>The second (<code>acc</code> ) contains the individual steps of the final handshake.</p>
</blockquote>
<p>A simple example would be great.<br>
Thank you <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="347389" 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/bitwise-operator-in-elixir-need-help-understanding-it/25924/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-347389" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="347389"
                     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="347449" data-post-id="347449">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>With that I mean that the <code>acc</code>umulator accumulates the list of handshakes that have to be returned and found <em>so far</em>.</p>
<p>My submission from 7 years ago is still public, and even though I updated it today to pass the tests (a simple rename of files), I can not figure how to publish the latest version…</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://exercism.org/tracks/elixir/exercises/secret-handshake/solutions/NobbZ">
  <header class="source">
      <img src="https://assets.exercism.org/meta/favicon-32x32.png" class="site-icon" alt="" width="32" height="32">

      <a href="https://exercism.org/tracks/elixir/exercises/secret-handshake/solutions/NobbZ" target="_blank" rel="noopener nofollow">Exercism</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/513;"><img src="https://assets.exercism.org/tracks/elixir/exercises/secret-handshake/solutions/NobbZ-1732529397.jpg" class="thumbnail" alt="" width="690" height="513"></div>

<h3><a href="https://exercism.org/tracks/elixir/exercises/secret-handshake/solutions/NobbZ" target="_blank" rel="noopener nofollow">NobbZ's solution for Secret Handshake in Elixir on Exercism</a></h3>

  <p>See how @NobbZ solved Secret Handshake in Elixir and get inspired for how you could solve it too! Exercism is 100% free and a great way to level-up your programming skills in over 65 languages.</p>


  </article>

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

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

<p>As you can see, the individual handshakes from the 3rd argument get incrementally added to the front of the <code>acc</code> in the recursive calls. So this list is build up in reverse. Therefore, if the secret code demands a “reversal” of the handshakes, I return the accumulator as is, and if no “reversal” is demanded, I reverse it, to get it forward.</p>
<p>This building in reverse is common when recursively buiding a list.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="347449" 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/bitwise-operator-in-elixir-need-help-understanding-it/25924/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-347449" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="347449"
                     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="347456" data-post-id="347456">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yep, seeing it all together clarifies the solution. Thank you!<br>
As for re-submitting a new version, you can always do it by running<br>
<code>exercism submit lib/secret_handshake.ex</code> from your terminal (excersism CLI should be installed first).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="347456" 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/bitwise-operator-in-elixir-need-help-understanding-it/25924/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-347456" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="347456"
                     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>