[erlang-questions] Testing for improper list

Guilherme Andrade g@REDACTED
Mon Jul 16 02:17:21 CEST 2018


Hello Karlo,

On 16 July 2018 at 01:07, Karlo Kuna <kuna.prime@REDACTED> wrote:

> Is there any built in method of checking if list is improper?
>

Something like this should do:

> is_improper_list(Value) when length(Value) >= 0
->

>
false;

> is_improper_list(Value)
->

>     is_list(Value).

`length/1' will fail upon Value being an improper list.

-- 
Guilherme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180716/15455d2c/attachment.htm>


More information about the erlang-questions mailing list