<p dir="ltr">+1 for -1, 0, and 1, math simplifies then in cases</p>
<div class="gmail_quote">On Oct 29, 2013 10:39 AM, "José Valim" <<a href="mailto:jose.valim@plataformatec.com.br">jose.valim@plataformatec.com.br</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif"><div>"Not me against".<br></div><div><br></div><div>But I think that term_compare/2 should return the term comparison operators <:<, =:=, >:> (or the @... alternatives) while compare/2 should return the old comparison operators as this is what they test.<br>


</div></div></div></blockquote><div><br></div><div>Another idea is to make them return -1, 0 and 1. Then you can use the output of both term_compare/2 and compare/2 (or any other comparison function) without checking for specific operators.</div>


<div><br></div><div class="gmail_extra"><div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;border-collapse:collapse"><div>


<span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div>


<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></div></div></div></div><br></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>