<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 27, 2017 at 3:28 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 01/27/2017 01:07 PM, Brent Brinkley wrote:</span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Suggested structure:<br>
<br>
print() <| some_func() <| another_func("Hello")<br>
</blockquote>
<br>
My first question is what does this look like when print() and some_func() have other parameters? In other words, what would this look like?<br>
<br>
print('hello', name, some_func('whatsit', another_func('good-bye')), sep=' .-. ')</blockquote><div><br></div><div>The Elixir pipe operator looks pretty close to the suggested style, but the argument order is reversed:</div><div><br></div><div>another_func('good-bye') |> some_func('whatsit') |> print('hello', name, sep=' .-. ')</div><div><br>This isn't exactly equivalent to the example though because the result of each call is passed as the first argument to the next function. I think it looks nice when it's the right fit, but it's limited to the first argument.</div></div><div><br></div>-- <br><div class="gmail_signature"><br>C Anthony</div>
</div></div>