<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature">I'll make sure it gets named erlang:'[_|_]'/2 in your honour.</div><div class="gmail_signature" data-smartmail="gmail_signature"><br> /Richard</div></div>
<br><div class="gmail_quote">2017-11-14 11:15 GMT+01:00 Cons T Åhs <span dir="ltr"><<a href="mailto:cons@tail-f.com" target="_blank">cons@tail-f.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On 14 Nov 2017, at 09:50, Richard Carlsson <<a href="mailto:carlsson.richard@gmail.com" target="_blank">carlsson.richard@gmail.com</a>> wrote:</div><br class="m_2215433131382331583Apple-interchange-newline"><div><div dir="ltr">Most operators have a corresponding function in the 'erlang' module. For example, A + B can be written erlang:'+'(A,B). However, the cons operator [|] does not, as far as I know.</div></div></blockquote><div><br></div></span><div>I’ve always considered this a gross oversight for several reasons. One is that you have to write your own local fun when you want to pass it as higher order functional argument, another is that should one generate Erlang code directly one has to take care of this and generate special syntax. Then there is the personal obvious reason :-)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Cons</div></font></span><span class=""><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="m_2215433131382331583gmail_signature" data-smartmail="gmail_signature"><br> /Richard</div></div>
<br><div class="gmail_quote">2017-11-14 8:56 GMT+01:00 Zhongzheng Liu <span dir="ltr"><<a href="mailto:liuzhongzheng2012@gmail.com" target="_blank">liuzhongzheng2012@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi mail-list:<br>
<br>
Which built-in function work as fun(H, T) -> [H|T] end ?<br>
<br>
i.e how to fill the following expression without user defined function ?<br>
<br>
[H|T] = erlang:apply(???, ???, [H, T]).<br>
<br>
<br>
Thanks<br>
<span class="m_2215433131382331583HOEnZb"><font color="#888888"><br>
Liu zhongzheng<br>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</font></span></blockquote></div><br></div>
______________________________<wbr>_________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br></div></blockquote></span></div><br></div></blockquote></div><br></div></div>