<div dir="ltr"><div>As off topic, the
is_improper_list/1 may be rewritten to ...<br></div><div><br></div><div>is_improper_list([_|Value]) -> is_improper_list(Value);<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 16, 2018 at 8:17 AM, Guilherme Andrade <span dir="ltr"><<a href="mailto:g@gandrade.net" target="_blank">g@gandrade.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Karlo,<br><div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On 16 July 2018 at 01:07, Karlo Kuna <span dir="ltr"><<a href="mailto:kuna.prime@gmail.com" target="_blank">kuna.prime@gmail.com</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"><div dir="auto"><div dir="auto"></div><div dir="auto">Is there any built in method of checking if list is improper?</div></div></blockquote><div><br></div></span><div>Something like this should do:<br><br>> is_improper_list(Value) when length(Value) >= 0 -> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <br>> false; <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <br>> is_improper_list(Value) -> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <br>> is_list(Value).</div><div><br></div><div>`length/1' will fail upon Value being an improper list.<span class="HOEnZb"><font color="#888888"><br></font></span></div></div><span class="HOEnZb"><font color="#888888"><br>-- <br><div class="m_8064370586653248864gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Guilherme<br></div></div></div></div></div></div>
</font></span></div></div></div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><br></div>Best Regards.<div><br></div><div>--- Y-H. H.</div><div><br></div></div>
</div></div>