<div>Hi,</div><div> </div><div>That's what is called "improper list". Lists in Erlang are basically two pointers, to head and to tail, and both of them actually can be of any type.</div><div>List of, say, two elements - [1, 2] - is actually just a syntactic sugar for [1 | [2 | []]], where [] is a special value meaning "empty list". Obviously, anything can be used in its place.</div><div> </div><div>Improper lists can lead to strange errors and definitely should be avoided. They probably can be used in place of 2-tuples when you need some crazy micro-optimization, because I think they're a bit faster. But still, do not try that at home.</div><div> </div><div>Cheers,</div><div>-- </div><div>Konstantin</div><div> </div><div>03.07.2013, 14:03, "饕餮" <249505968@qq.com>:</div><blockquote type="cite">One of my new teammate found that this expression can work like list:nth(1,[1|1]) is legal.<div>And the is_list([1|1]) is true</div><div>so what's this expression mean or it's just like some bug?</div>,<p>_______________________________________________<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">http://erlang.org/mailman/listinfo/erlang-questions</a></p></blockquote>