[erlang-questions] Wrong advertised spec of lists:append/2
Pierre Fenoll
pierrefenoll@REDACTED
Thu Mar 28 14:53:00 CET 2013
The spec says both arguments and the result are lists.
Indeed there is a contradiction with said spec. Isn't that a problem?
On 28 March 2013 14:42, Adam Rutkowski <hq@REDACTED> wrote:
>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130328/dba57649/attachment.htm>
More information about the erlang-questions
mailing list