[erlang-questions] Wrong advertised spec of lists:append/2

Adam Rutkowski <>
Thu Mar 28 14:42:35 CET 2013


On 28 Mar 2013, at 14:36, Pierre Fenoll wrote:

> As per the doc, the spec of lists:append/2 is ([term()], [term()]) -> [term()].
> 
> However, a = lists:append([], a).

If the spec was ([term()], term()) then maybe ;-)
Also, the documentation (and implementation as well) clearly states it's equivalent to A ++ B.

A.


More information about the erlang-questions mailing list