Basic lists(?) question

Steve Davis steven.charles.davis@REDACTED
Sat Sep 18 02:34:00 CEST 2010


What is the meaning of applying the | operator to a non-list tail?

1> A = [a|0].
[a|0]
2> is_list(A).
true
3> length(A).
** exception error: bad argument
     in function  length/1
        called as length([a|0])

Sorry if this has been asked many times before. I kind of remember
seeing this before, but I can't find it in a search.

/s


More information about the erlang-questions mailing list