<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="31314" data-post-id="31314">
  <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
                    <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>And yes, changing the ffi to be multi-pathed works as expected:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">        external addi(integer, integer) | integer = Kernel.Blah.add
</code></pre>
<p>Changes the relevant parts in the javascript to:</p>
<pre data-code-wrap="javascript"><code class="lang-javascript">function addi(add__var__0, add__var__1) {
        return require("Kernel").Blah.add(add__var__0, add__var__1);
}
function testering_ffi_addi_0() {
        return require("Kernel").Blah.add(1, 2);
}
function testering_ffi_addi_1(i) {
        return require("Kernel").Blah.add(1, i);
}
function testering_ffi_addi_2(a, b) {
        return require("Kernel").Blah.add(a, b);
}
</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="31314" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-31314" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31314"
                     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 #31"></div>
  </section>
</div>
    <div class="postbit" id="31326" data-post-id="31326">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Very interesting project <a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a>. Thanks for sharing it with us. Kind of makes me want to learn ML <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> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="31326" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-31326" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31326"
                     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 #32"></div>
  </section>
</div>
    <div class="postbit" id="31328" data-post-id="31328">
  <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
                    <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">
								<aside class="quote no-group" data-username="smpallen99" data-post="33" data-topic="3693">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>Very interesting project <a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a>. Thanks for sharing it with us. Kind of makes me want to learn ML <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>
</blockquote>
</aside>
<p>I’d recommend OCaml, even if you do not end up using it, the ideas and ways of thinking it imparts on you will help you everywhere.  <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>I’m trying to emulate OCaml’s syntax as much as I can, but cannot get very close to it with how Eixir’s AST is parsed, I’d have to drop down to a string if I wanted it proper.  ^.^</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="31328" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-31328" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31328"
                     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 #33"></div>
  </section>
</div>
    <div class="postbit" id="31331" data-post-id="31331">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I started looking at Haskell a couple weeks ago. Just to see if it could help me with my Elixir. Got a little lost as I read along. Had a hard time remember the syntax of early chapters since I did not do very many exercises. At 50+ years old, my memory is not like it  used to be.</p>
<p>I’ll take a quick peek at OCaml. Thanks for the recommendation.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="31331" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-31331" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31331"
                     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 #34"></div>
  </section>
</div>
    <div class="postbit" id="31336" data-post-id="31336">
  <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
                    <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>OCaml and Haskell take divergent paths from H-M Type Systems.</p>
<p>OCaml came from SML, which came from ML, which is short for Module Language.  OCaml/SML/ML do the higher H-M typing via the module system.</p>
<p>Haskell, well I’m not sure where it came from, but it went for typeclasses and 80 other things to try to emulate what modules can do.</p>
<p>Haskell was designed at a university, to be a research language, and it will never really ever be ‘finished’ and is constantly changing.  Consequently it is hard to get a lot done in it because you have to import a half dozen compiler extensions (<code>Language Blah</code> stuff at the top of files) just to do things that are fairly trivial with modules.</p>
<p>SML is basically ML with a ‘Standard’ defined set to unify on.  OCaml expanded on SML by adding an object system (that honestly no one really uses since modules can do it all anyway) as well as making modules entirely first-class, meaning that you can now do higher typing on higher types, which is what makes OCaml the one that can truly do anything Haskell can do and a <em>lot</em> more that Haskell cannot do.</p>
<p>However, OCaml’s syntax is very uniform, once you learn modules and functors then you can do it all, you can emulate Haskell’s typeclasses, emulate Haskell’s HKT’s, etc… etc…  And due to how the modules are designed in terms of non-global completeness they are <em>blazing</em> fast to compile, and this is why horrendously <em>huge</em> and complex OCaml programs still take less than a minute to compile, where comparatively simple Haskell programs can take minutes, and getting up to 30-60 minute compiles in Haskell is common with fairly simple programs, in addition OCaml’s optimizing compiler also generates code significantly faster than Haskell, making it within an order of speed of optimized C++ on average.  The only thing Haskell does ‘better’ right now is muti-threadedness, but OCaml has a finalizing a concurrent PR for OCaml to add far far better functionality (you could even emulate the BEAM with it’s upcoming setup).</p>
<p>However, unlike Haskell that iterates fast and breaks often, OCaml was designed By businesses For businesses, so every choice in it is designed to solve a problem and solve it well and permanently, so it is slow moving, but when something gets accepted into mainline then you know it is well tested and hardened.  OCaml was designed to get work done, and you can even sacrifice purity and put in a little magic (literally) to Get Stuff Done, just like how Erlang was designed.</p>
<p>But yes, learning OCaml is significantly easier than Haskell due to a more simple language with few constructs to learn, where Haskell has literal thousands of constructs depending on the extensions you enable, and even base Haskell has significantly more constructs than OCaml and still cannot do what OCaml does.</p>
<p>The OCaml compiler is highly pluggable as well, endlessly extendable, and there are other backends for it as well, including a Javascript back-end (a couple actually), and the OCaml compiler has been compiled with that backend to generate a javascript version of the compiler, so if you want to see the compiler’s utter speed as-you-type even while running in javascript, then you can type OCaml here and see the javascript output and the executed results as-you-type:  <a href="https://bloomberg.github.io/bucklescript/js-demo/index.html" class="inline-onebox" rel="noopener nofollow ugc">Redirecting to bucklescript.github.io/bucklescript</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="31336" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-31336" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31336"
                     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 #35"></div>
  </section>
</div>
    <div class="postbit" id="31337" data-post-id="31337">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="smpallen99" data-post="35" data-topic="3693">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>I’ll take a quick peek at OCaml.</p>
</blockquote>
</aside>
<p>Actually he’s made an intro <a href="http://blog.overminddl1.com/posts/setting-up-bucklescript-with-phoenix/" rel="noopener nofollow ugc">Setting up Bucklescript with Phoenix</a> which may be one way to get started.</p>
<aside class="quote no-group" data-username="smpallen99" data-post="35" data-topic="3693">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/48/1157_2.png" class="avatar"> smpallen99:</div>
<blockquote>
<p>I started looking at Haskell a couple weeks ago</p>
</blockquote>
</aside>
<p>I’ve been chasing Haskell off and on since 1998; “The Haskell School of Expression”, “Haskell The Craft of Functional Programming 2e”, “Programming Haskell”, “Real World Haskell” - so far <a href="http://haskellbook.com/" rel="noopener nofollow ugc">Haskell Programming from first Principles</a> makes the most sense without having to take a course in category theory first.</p>
<aside class="quote no-group" data-username="OvermindDL1" data-post="34" data-topic="3693">
<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>I’d recommend OCaml</p>
</blockquote>
</aside>
<p>What resources can you recommend for non-hyperglots? (I may have missed that somewhere - OK you <em>just</em> beat me to it).<br>
Not everybody <em>attacks</em> programming languages the same way you do <img src="https://forum.elixirforum.com/uploads/default/original/2X/4/425cf8a2af1868cc834c0a12b6f0c9ef0e530de9.gif?v=15" title=":icon_biggrin:" class="emoji emoji-custom" alt=":icon_biggrin:" 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="31337" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-31337" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31337"
                     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 #36"></div>
  </section>
</div>
    <div class="postbit" id="31338" data-post-id="31338">
  <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
                    <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">
								<aside class="quote no-group quote-modified" data-username="peerreynders" data-post="37" data-topic="3693">
<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>What resources can you recommend for non-hyperglots? (I may have missed that somewhere).<br>
Not everybody attacks programming languages the same way you do <img src="https://forum.elixirforum.com/uploads/default/original/2X/4/425cf8a2af1868cc834c0a12b6f0c9ef0e530de9.gif?v=15" title=":icon_biggrin:" class="emoji emoji-custom" alt=":icon_biggrin:" loading="lazy" width="20" height="20"> .</p>
</blockquote>
</aside>
<p>Lol, the official docs and tutorial site are great starting places.  <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>Also, I apparently responded to the post like a second before you did…  ^.^;</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="31338" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-31338" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31338"
                     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 #37"></div>
  </section>
</div>
    <div class="postbit" id="31963" data-post-id="31963">
  <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
                    <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>Some more today, got tuples in, and made a tupleizable version of ADT’s, used like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    | tuple_enum0{}
    | tuple_enum1{integer}
    | tuple_enum2{integer, float}
</code></pre>
<p>If used like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    def testering20 = tuple_enum0
    def testering21 = tuple_enum1 42
    def testering22 = tuple_enum2
    def testering23 = tuple_enum2 42
    def testering24(f) = tuple_enum2 42, f
    def testering25 = tuple_enum2 42, 6.28
</code></pre>
<p>All results in this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    assert MLModuleTest_Specific.testering20 === {:tuple_enum0}
    assert MLModuleTest_Specific.testering21 === {:tuple_enum1, 42}
    assert MLModuleTest_Specific.testering22.(42, 6.28) === {:tuple_enum2, 42, 6.28}
    assert MLModuleTest_Specific.testering23.(6.28) === {:tuple_enum2, 42, 6.28}
    assert MLModuleTest_Specific.testering24(6.28) === {:tuple_enum2, 42, 6.28}
    assert MLModuleTest_Specific.testering25 === {:tuple_enum2, 42, 6.28}
</code></pre>
<p>If you really do want a tuple value, then just double it up:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    | tuple_recurception{{integer, float}}
</code></pre>
<p>Used like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    def testering27 = tuple_recurception {42, 6.28}
</code></pre>
<p>Which returns:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    assert MLModuleTest_Specific.testering27 === {:tuple_recurception, {42, 6.28}}
</code></pre>
<p>In addition, normal tuple stuff:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    type tuple0 = {}
    type tuple1 = {integer}
    type tuple2 = {integer, float}
    type tuple3 = {integer, {float, integer}}
</code></pre>
<p>Used like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    def testering_tuple0 | tuple0 = {}
    def testering_tuple1(t) | tuple0 = t
    def testering_tuple2 = {}
    def testering_tuple3 = {42}
    def testering_tuple4 | tuple1 = {42}
    def testering_tuple5(i) | tuple1 = {i}
    def testering_tuple6(t) | tuple1 = t
    def testering_tuple7 | tuple1 = testering_tuple3
    def testering_tuple8 = {42, 6.28}
    def testering_tuple9(i|!t) = {i, 6.28}
    def testering_tuple10(i) | tuple2 = testering_tuple9 i
    def testering_tuple11 | tuple2 = testering_tuple9 41
    def testering_tuple12 | tuple3 = {42, {6.28, 42}}
</code></pre>
<p>Which returns:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    assert MLModuleTest_Specific.testering_tuple0() === {}
    assert MLModuleTest_Specific.testering_tuple1({}) === {}
    assert MLModuleTest_Specific.testering_tuple2() === {}
    assert MLModuleTest_Specific.testering_tuple3() === {42}
    assert MLModuleTest_Specific.testering_tuple4() === {42}
    assert MLModuleTest_Specific.testering_tuple5(42) === {42}
    assert MLModuleTest_Specific.testering_tuple6({42}) === {42}
    assert MLModuleTest_Specific.testering_tuple7() === {42}
    assert MLModuleTest_Specific.testering_tuple8() === {42, 6.28}
    assert MLModuleTest_Specific.testering_tuple9(42) === {42, 6.28}
    assert MLModuleTest_Specific.testering_tuple10(42) === {42, 6.28}
    assert MLModuleTest_Specific.testering_tuple11() === {42, 6.28}
    assert MLModuleTest_Specific.testering_tuple12() === {42, {6.28, 42}}
</code></pre>
<p>Fairly type safe as expected, you cannot even pass a float to, say, <code>MLModuleTest_Specific.testering_tuple5(6.28)</code> as you will get a resolution error at compile-time.</p>
<p>Also added in support for calling in to records:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    type record_emb_0 = %{a: %{b: %{c: integer}}}
    def testering_record11(r | record_emb_0) = r.a.b.c
</code></pre>
<p>Properly checked and typesafe and so forth as usual.  I do not have auto-detection for a generic record type at this time, and honestly I’m unsure if I want to as it would make <code>.</code> ambiguous between different types, so that may require typing like the above unless I want to do a special syntax or something…  Thoughts?</p>
<p>Also, for some reason I was not handling 0-arg function calls yet, fixed that so they work now too…  &gt;.&gt;</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="31963" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-31963" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="31963"
                     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 #38"></div>
  </section>
</div>
    <div class="postbit" id="32022" data-post-id="32022">
  <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
                    <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>Decided to add auto-currying as well.  Unlike other auto-currying languages on the beam (*cough*alpaca**cough*elmchamy*cough*) that auto-curry at the definition site, thus using up every single arity of a function, I’m auto-currying at the call site, which is something the BEAM is well optimized for anyway, thus given these definitions:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    def testering_func0 = 42
    def testering_func1(a, b, c) | {integer, integer, integer} = {a, b, c}
    def testering_func2(a | integer, b | integer, c | integer) = {a, b, c}
    def testering_func3(a | integer, b | integer, c | integer) | {integer, integer, integer} = {a, b, c}
    def testering_func4 = testering_func0
    def testering_func5 = testering_func1 1, 2, 3
    def testering_func6(a, b, c) = testering_func1 a, b, c
    def testering_func7(a) = testering_func1 1, a, 3
    def testering_func8 = testering_func1
    def testering_func9(a) = testering_func1 a
    def testering_func10(a) = testering_func1 1, a
    def testering_func11(a) = testering_func1 a, 2
    def testering_func12(a, b) = testering_func1 a, b
    def testering_func13(a) = testering_func1 a, _, _
    def testering_func14(a) = testering_func1 _, a, _
    def testering_func15(a) = testering_func1 _, _, a
    def testering_func16(a) = testering_func1 _, a
    def testering_func17(a) = testering_func1 a, _0, _1
    def testering_func18(a) = testering_func1 a, _1, _0
    def testering_func19(a) = testering_func1 a, _1
</code></pre>
<p>Which can be used like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    assert MLModuleTest_Specific.testering_func0() === 42
    assert MLModuleTest_Specific.testering_func1(1, 2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func2(1, 2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func3(1, 2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func4() === 42
    assert MLModuleTest_Specific.testering_func5() === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func6(1, 2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func7(2) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func8().(1, 2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func9(1).(2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func10(2).(3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func11(1).(3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func12(1, 2).(3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func13(1).(2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func14(2).(1, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func15(3).(1, 2) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func16(2).(1, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func17(1).(2, 3) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func18(1).(3, 2) === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func19(1).(:unused, 2, 3) === {1, 2, 3}
</code></pre>
<p>And the generated elixir:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def(testering_func0()) do
    42
  end
  def(testering_func1(a, b, c) when is_integer(c) and (is_integer(b) and is_integer(a))) do
    {a, b, c}
  end
  def(testering_func2(a, b, c) when is_integer(c) and (is_integer(b) and is_integer(a))) do
    {a, b, c}
  end
  def(testering_func3(a, b, c) when is_integer(c) and (is_integer(b) and is_integer(a))) do
    {a, b, c}
  end
  def(testering_func4()) do
    testering_func0()
  end
  def(testering_func5()) do
    testering_func1(1, 2, 3)
  end
  def(testering_func6(a, b, c) when is_integer(c) and (is_integer(b) and is_integer(a))) do
    testering_func1(a, b, c)
  end
  def(testering_func7(a) when is_integer(a)) do
    testering_func1(1, a, 3)
  end
  def(testering_func8()) do
    fn ($var_0, $var_1, $var_2) when is_integer($var_2) and (is_integer($var_1) and is_integer($var_0)) -&gt; testering_func1($var_0, $var_1, $var_2) end
  end
  def(testering_func9(a) when is_integer(a)) do
    fn ($var__0, $var__1) when is_integer($var__1) and is_integer($var__0) -&gt; testering_func1(a, $var__0, $var__1) end
  end
  def(testering_func10(a) when is_integer(a)) do
    fn $var__0 when is_integer($var__0) -&gt; testering_func1(1, a, $var__0) end
  end
  def(testering_func11(a) when is_integer(a)) do
    fn $var__0 when is_integer($var__0) -&gt; testering_func1(a, 2, $var__0) end
  end
  def(testering_func12(a, b) when is_integer(b) and is_integer(a)) do
    fn $var__0 when is_integer($var__0) -&gt; testering_func1(a, b, $var__0) end
  end
  def(testering_func13(a) when is_integer(a)) do
    fn ($var_0, $var_1) when is_integer($var_1) and is_integer($var_0) -&gt; testering_func1(a, $var_0, $var_1) end
  end
  def(testering_func14(a) when is_integer(a)) do
    fn ($var_0, $var_1) when is_integer($var_1) and is_integer($var_0) -&gt; testering_func1($var_0, a, $var_1) end
  end
  def(testering_func15(a) when is_integer(a)) do
    fn ($var_0, $var_1) when is_integer($var_1) and is_integer($var_0) -&gt; testering_func1($var_0, $var_1, a) end
  end
  def(testering_func16(a) when is_integer(a)) do
    fn ($var_0, $var__0) when is_integer($var__0) and is_integer($var_0) -&gt; testering_func1($var_0, a, $var__0) end
  end
  def(testering_func17(a) when is_integer(a)) do
    fn ($var_0, $var_1) when is_integer($var_1) and is_integer($var_0) -&gt; testering_func1(a, $var_0, $var_1) end
  end
  def(testering_func18(a) when is_integer(a)) do
    fn ($var_0, $var_1) when is_integer($var_1) and is_integer($var_0) -&gt; testering_func1(a, $var_1, $var_0) end
  end
  def(testering_func19(a) when is_integer(a)) do
    fn (_, $var_1, $var__0) when is_integer($var__0) and is_integer($var_1) -&gt; testering_func1(a, $var_1, $var__0) end
  end
</code></pre>
<p>As you can see, if you skip a placement (as in <code>testering_func19</code>) by using, say, <code>_1</code> without the <code>_0</code> then a <code>_0</code> remains unbound and unused.  It also supports from <code>_0</code> up to <code>_127</code>, easily adjustable if it ends up being too much or too little (how?!).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="32022" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-32022" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="32022"
                     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 #39"></div>
  </section>
</div>
    <div class="postbit" id="32028" data-post-id="32028">
  <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
                    <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>Also added the ability to call things from other calls, including all the usual currying and such, building on the prior example:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    def testering_func8 = testering_func1
    def testering_func9(a) = testering_func1 a
    def testering_func12(a, b) = testering_func1 a, b
    def testering_func20 = testering_func8 1, 2, 3
    def testering_func21 = testering_func9 1, 2, 3
    def testering_func22 = testering_func12 1, 2, 3
    def testering_func23 = testering_func9 1, _
</code></pre>
<p>Which can be used as:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    assert MLModuleTest_Specific.testering_func20() === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func21() === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func22() === {1, 2, 3}
    assert MLModuleTest_Specific.testering_func23().(2, 3) === {1, 2, 3}
</code></pre>
<p>Which the generated Elixir is:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def(testering_func20()) do
    testering_func8().(1, 2, 3)
  end
  def(testering_func21()) do
    testering_func9(1).(2, 3)
  end
  def(testering_func22()) do
    testering_func12(1, 2).(3)
  end
  def(testering_func23()) do
    fn ($var_0_22, $var__0_23) when is_integer($var__0_23) and is_integer($var_0_22) -&gt; testering_func9(1).($var_0_22, $var__0_23) end
  end
</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="32028" 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/mlelixir-attempting-an-ml-traditional-syntax-entirely-within-the-elixir-ast/3693/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-32028" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="32028"
                     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 #40"></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/3693/load_more?page=5">Load more posts (66 remaining)</a>
</div></template></turbo-stream>