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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I guess I could shorten the previous posting.</p>
<p>Please don’t sell Elixir as an FPL - it’s not it’s a CPL (Concurrent Programming Language)</p>
<p>Don’t get into “my FPL is purer than yours” arguments. Don’t even think about talking about Monads. Change the subject.</p>
<p>“What’s a CPL?”<br>
“You know, the kind of stuff the WhatsApp servers are written in …”</p>
<p><img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji only-emoji" alt=":slight_smile:" 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="96428" data-batch-url="/posts/batch_likers">
                        36
                      </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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/53">Post #52</a>
	                </div>
	            </div>
              <div id="likers-container-96428" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="96428"
                     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 #52"></div>
  </section>
</div>
    <div class="postbit" id="96474" data-post-id="96474">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Erlang-Core-Team" data-username="joeerl" data-post="53" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/joeerl/48/6651_2.png" class="avatar"> joeerl:</div>
<blockquote>
<p>Don’t even think about talking about Monads.</p>
</blockquote>
</aside>
<p>Killjoy <img src="https://forum.elixirforum.com/images/emoji/apple/unamused.png?v=15" title=":unamused:" class="emoji" alt=":unamused:" loading="lazy" width="20" height="20"></p>
<p><img src="https://forum.elixirforum.com/images/emoji/apple/grinning.png?v=15" title=":grinning:" class="emoji only-emoji" alt=":grinning:" 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="96474" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/54">Post #53</a>
	                </div>
	            </div>
              <div id="likers-container-96474" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="96474"
                     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 #53"></div>
  </section>
</div>
    <div class="postbit" id="96687" data-post-id="96687">
  <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="Fl4m3Ph03n1x" data-post="31" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fl4m3ph03n1x/48/11709_2.png" class="avatar"> Fl4m3Ph03n1x:</div>
<blockquote>
<p>But perhaps I am mistaken? Perhaps there is a way to call anonymous functions when currying that doesn’t require binding ? ( and thus promotes the usage of the <code>()</code> syntax ? )</p>
</blockquote>
</aside>
<p>There used to be via ‘Tuple Call’, but that feature was removed from the BEAM at the behest of Elixir in the most recent version, now it can only be used if a compiler option is passed in.</p>
<aside class="quote no-group" data-username="peerreynders" data-post="33" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/48/5826_2.png" class="avatar"> peerreynders:</div>
<blockquote>
<p>Languages like Haskell and OCaml popularized a notational convenience where you can use forms like <code>f(1)</code> and <code>f(1,2)</code> to return another function. But somehow people conflate that notational convenience with “currying”.</p>
</blockquote>
</aside>
<p>I was looking for this!  But yes, OCaml does not have automatic currying at definition site.  In OCaml a proper inlineable efficient function definition and usage would be:</p>
<pre data-code-wrap="ocaml"><code class="lang-ocaml">let add(a, b) = a + b

let 3 = add(1, 2)
</code></pre>
<p>Conceptually this is a single-argument function that takes a tuple, but the OCaml compiler actually fully sets that up as a tuple-less stack-based function invocation like you would do in C++.  The ‘normal’ function definition in OCaml would be:</p>
<pre data-code-wrap="ocaml"><code class="lang-ocaml">(* short form *)
let add a b = a + b
(* long form *)
let add = fun a -&gt; fun b -&gt; a + b

let 3 = add 1 2
</code></pre>
<p>Conceptually this is a function that takes an integer and returns a function that takes an integer that returns an integer.  However OCaml’s compiler is built for the very purpose of optimizing this case back into the prior one (which is why it is so blazing fast), but will create thunks as necessary for any partial application.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>The ‘tuple’ form is not partial appliable though, hence why most don’t use it.  In SML (OCaml’s predecessor) it does not optimize the ‘curry-style’ to normal calls very well, so it is common to see people use the tuple style as it is just faster in comparison, that is why OCaml went the other way and pretend that currying is not currying and instead makes normal functions that it partially applies via thunks on demand.</p>
<p>And thus yes, ‘currying is a mere frill’ is entirely true.  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>In my <a href="https://forum.elixirforum.com/t/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693" rel="nofollow">MLElixir</a> little sandbox thing I had that same ‘currying’ style as OCaml, they are normal calls but they pretend they are not via automatic thunk generation as necessary (although the syntax I find even nicer than OCaml’s as you can partially apply <em>any</em> of the arguments, not just the start or end arguments ^.^).</p>
<aside class="quote no-group" data-username="easco" data-post="35" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/easco/48/1250_2.png" class="avatar"> easco:</div>
<blockquote>
<p>“Horrible” is obviously a subjective opinion</p>
</blockquote>
</aside>
<p>As a long time FP’er, ‘horrible’ in this context means that you cannot pipe into a partial application, but since Elixir doesn’t have partial application it’s not as big of an issue (and thus elixir arbitrarily chose to pipe into the start argument, which I do find a touch odd honestly as erlang prefers topic-last arguments like most functional languages, but eh, it works).  <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="jeremyjh" data-post="42" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jeremyjh/48/5995_2.png" class="avatar"> jeremyjh:</div>
<blockquote>
<p>No not really. I think this is one of the biggest warts of the language.</p>
</blockquote>
</aside>
<p>It’s an aspect of the BEAM.  It could have been worked around by Elixir pretty trivially via tuple calls, but I ‘think’ those are slightly slower to call than the anonymous function syntax, I’m not certain though, need benchmarking…</p>
<aside class="quote no-group" data-username="slashdotdash" data-post="50" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/slashdotdash/48/3090_2.png" class="avatar"> slashdotdash:</div>
<blockquote>
<p>The <a href="https://hexdocs.pm/elixir/Kernel.SpecialForms.html#with/1" rel="noopener nofollow ugc"> <code>with</code> </a> keyword</p>
</blockquote>
</aside>
<p>I find <code>with</code> to be more of an ‘early-out’ construct than anything moand’y, but that does handle many use-cases regardless.</p>
<aside class="quote group-Erlang-Core-Team" data-username="joeerl" data-post="52" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/joeerl/48/6651_2.png" class="avatar"> joeerl:</div>
<blockquote>
<p>For a long time I’ve said “Erlang is the only true OO language” (now I guess I can add Elixir).</p>
</blockquote>
</aside>
<p>And lfe for another big beam language!  ^.^</p>
<p>But yes, the BEAM is far more proper OOP than any more traditional OOP language.</p>
<aside class="quote group-Erlang-Core-Team" data-username="joeerl" data-post="53" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/joeerl/48/6651_2.png" class="avatar"> joeerl:</div>
<blockquote>
<p>“What’s a CPL?”<br>
“You know, the kind of stuff the WhatsApp servers are written in …”</p>
</blockquote>
</aside>
<p>Lol, I’m swiping this.  ^.^</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="96687" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/55">Post #54</a>
	                </div>
	            </div>
              <div id="likers-container-96687" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="96687"
                     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 #54"></div>
  </section>
</div>
    <div class="postbit" id="96733" data-post-id="96733">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey again!</p>
<p>First of all, I would like to thank everyone for their time and support in this discussion. The community’s response has been truly overwhelming and surprisingly positive considering the tone of my first post, which I wrote in a moment of frustration and anguish.</p>
<p>Since I have joined the community I have learned the true purpose of Elixir / Erlang and I have read a lot about its strengths. I am now invested in learning more and I can’t wait to bring all this knowledge to my company. I want you all to know that it was the effort the community poured into this topic that enlightened me.</p>
<p>Now I hope I can one day pay back, but so far I still have a long road ahead of me and that’s fine - at least now <em>I know it</em>.</p>
<p>As this discussion grows, so does the time I need to invest into reading every single post. A great number of individuals have poured their brilliant responses here and I have read them all, but it is my belief that <em>I learned my lesson</em>.</p>
<p>Now I have a plethora of other lessons I still need to learn and little time to invest in each. It is for this reason that I will stop answering comments in this discussion. It is my belief that I already got everything I could from here, and I want to invest my time learning other lessons that Elixir /Erlang both have to offer me.</p>
<p>If you are reading this late, or arrive here after this post, don’t feel angry nor discouraged because the original poster didn’t reply to you. I am just 1 person and you are lot. Instead if you feel that something still needs to be said do it for any future readers who may find this discussion interesting.</p>
<p>Thank you all!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="96733" data-batch-url="/posts/batch_likers">
                        13
                      </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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/56">Post #55</a>
	                </div>
	            </div>
              <div id="likers-container-96733" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="96733"
                     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 #55"></div>
  </section>
</div>
    <div class="postbit" id="96769" data-post-id="96769">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for the useful links. I really appreciate it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="96769" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/57">Post #56</a>
	                </div>
	            </div>
              <div id="likers-container-96769" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="96769"
                     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 #56"></div>
  </section>
</div>
    <div class="postbit" id="98355" data-post-id="98355">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="OvermindDL1" data-post="55" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/overminddl1/48/2677_2.png" class="avatar"> OvermindDL1:</div>
<blockquote>
<p>and thus elixir arbitrarily chose to pipe into the start argument, which I do find a touch odd honestly as erlang prefers topic-last arguments like most functional languages, but eh, it works</p>
</blockquote>
</aside>
<p>I’ve often wondered why this choice too.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98355" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/58">Post #57</a>
	                </div>
	            </div>
              <div id="likers-container-98355" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98355"
                     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 #57"></div>
  </section>
</div>
    <div class="postbit" id="98388" data-post-id="98388">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sasajuric" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/120/991_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sasajuric
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Elixir In Action</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="globalkeith" data-post="58" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/globalkeith/48/22277_2.png" class="avatar"> globalkeith:</div>
<blockquote>
<p>I’ve often wondered why this choice too.</p>
</blockquote>
</aside>
<p>Not sure why this decision has been made, but I can tell you it’s one of my favourite Elixir properties, because I’ve always found the ordering in Erlang stdlib confusing. Let me explain this with a simple example using <a href="http://erlang.org/doc/man/lists.html#map-2" rel="nofollow">:lists.map</a>. Here’s how we map a list:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">:lists.map(
  fn el -&gt; do_something(el) end,
  fetch_elements_from_somewhere(...)
)
</code></pre>
<p>I’ve always had problems reading such code, because the order of arguments is unnatural to me. The first argument explains how each element is transformed. My problem here is that at this point I don’t know what each element is, so the information is partial. Perhaps it’s just how my mind is wired, but I usually want to know what is being transformed before knowing how is it being transformed. Thus, the reading order for me is: line 1, line 3, line 2.</p>
<p>I used the same order when writing code. I’d start with this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">:lists.map(
  ,
)
</code></pre>
<p>Then, I’d proceed with:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">:lists.map(
  ,
  fetch_elements_from_somewhere(...)
)
</code></pre>
<p>And only then would I add the mapper function.</p>
<p>The story is even more complicated with <code>:lists.foldl</code>, where reading/writing order for me is 1, 4, 3, 2 <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>Again, perhaps it’s just how my mind works, but I find Elixir’s convention more natural, because it helps me read/write code in a more linear fashion.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98388" data-batch-url="/posts/batch_likers">
                        8
                      </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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/59">Post #58</a>
	                </div>
	            </div>
              <div id="likers-container-98388" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98388"
                     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 #58"></div>
  </section>
</div>
    <div class="postbit" id="98410" data-post-id="98410">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It may be related to the Elixir idiom of passing optional args as an optional keyword list to functions which also supports the syntactic sugar of omitting the <code>[</code>.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Foo
  def bar(list, opts \\ []) do
    # ...
  end
end
</code></pre>
<p>Which allows it to be used as either:</p>
<ul>
<li><code>Foo.bar(list)</code></li>
<li><code>Foo.bar(list, [an: arg])</code></li>
<li><code>Foo.bar(list, an: arg)</code></li>
<li><code>list  |&gt; Foo.bar([an: arg]) |&gt; ...</code></li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98410" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/60">Post #59</a>
	                </div>
	            </div>
              <div id="likers-container-98410" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98410"
                     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 #59"></div>
  </section>
</div>
    <div class="postbit" id="98436" data-post-id="98436">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="slashdotdash" data-post="60" data-topic="16424">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/slashdotdash/48/3090_2.png" class="avatar"> slashdotdash:</div>
<blockquote>
<p>It may be related to the Elixir idiom of passing optional args as an optional keyword list to functions</p>
</blockquote>
</aside>
<p>Good point, I think that requires the piped-in arg to be first.</p>
<p>I just want to say that for someone who is <em>not</em> used to other languages that have something like this, Elixir’s way is far more intuitive. The piped-in arg is on the <em>left</em> of the call it’s being piped into, so why on earth should it become the <em>rightmost</em> argument of the call??? It’s coming in from the left, it should go into the left “slot” <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="98436" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/61">Post #60</a>
	                </div>
	            </div>
              <div id="likers-container-98436" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98436"
                     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 #60"></div>
  </section>
</div>
    <div class="postbit" id="98454" data-post-id="98454">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well… Just turn the pipe operator around the other way and set up the language so function execution proceeds from bottom to top:</p>
<pre><code>last_operation()   &lt;|
middle_operation() &lt;|
first_operation()  &lt;|
starting_data
</code></pre>
<p>(P.S.  Don’t <em>actually</em> do this)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="98454" 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/learning-elixir-frst-impressions-plz-dont-kill-me/16424/62">Post #61</a>
	                </div>
	            </div>
              <div id="likers-container-98454" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="98454"
                     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 #61"></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/16424/load_more?page=7">Load more posts (1 remaining)</a>
</div></template></turbo-stream>