[erlang-questions] What's this mean:[1|1]?It's it a bug?
Wed Jul 3 12:09:18 CEST 2013
[1|1] is an "improper list", in other words, a list that doesn't end
with an empty list . They're valid, but not terribly safe:
** exception error: bad argument
in function length/1
called as length([1|1])
I don't know if there's any use for them.
On 03/07/2013 11:03, 饕餮 wrote:
> One of my new teammate found that this expression can work like
> list:nth(1,[1|1]) is legal.
> And the is_list([1|1]) is true
> so what's this expression mean or it's just like some bug?
> erlang-questions mailing list
Ivan A. Uemlianin PhD
Speech Technology Research and Development
More information about the erlang-questions