<p dir="auto">The status quo, as I understand, is that the following is valid code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;The quick red fox jumped over the lazy dog.&quot; |&gt; length |&gt; sqrt |&gt; log"><pre class="notranslate"><code class="notranslate">"The quick red fox jumped over the lazy dog." |&gt; length |&gt; sqrt |&gt; log
</code></pre></div>
<p dir="auto">However, the following is not:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;The quick red fox jumped over the lazy dog.&quot; |&gt; length |&gt; hypot(9)"><pre class="notranslate"><code class="notranslate">"The quick red fox jumped over the lazy dog." |&gt; length |&gt; hypot(9)
</code></pre></div>
<p dir="auto">The way around this is using a stabby lambda, as in</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;The quick red fox jumped over the lazy dog.&quot; |&gt; length |&gt; x -&gt; hypot(x, 9)"><pre class="notranslate"><code class="notranslate">"The quick red fox jumped over the lazy dog." |&gt; length |&gt; x -&gt; hypot(x, 9)
</code></pre></div>
<p dir="auto">This is on the whole workable, but a tad clumsy. I wonder if this could possibly be reframed to work a little more like <a href="https://cran.r-project.org/web/packages/magrittr/vignettes/magrittr.html" rel="nofollow">magrittr</a>, where the operator automatically feeds the result of the previous operation into the next one as its first argument. I appreciate there is a degree of sacrificing the theoretical purity of the operator here (as of course this would mean the correspondence between <code class="notranslate">f |&gt; g</code> and <code class="notranslate">f ○ g</code>, but perhaps it would be a more convenient tool. Potentially, as a separate operator.</p>
<p dir="auto">What do you think?</p>
<p dir="auto">Would it be possible to allow calling any function on Any so that the value is passed to the function as the first parameter and the parameters passed to the function call on the value is added afterwards?<br>
ex.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sum(a::Int, b::Int) -&gt; a + b

a = 1
sum(1, 2) # = 3
a.sum(2) # = 3 or
1.sum(2) # = 3"><pre class="notranslate"><code class="notranslate">sum(a::Int, b::Int) -&gt; a + b

a = 1
sum(1, 2) # = 3
a.sum(2) # = 3 or
1.sum(2) # = 3
</code></pre></div>
<p dir="auto">Is it possible to indicate in a deterministic way what a function will return in order to avoid run time exceptions?</p>