<div dir="ltr"><div>Hello,<br></div><div><br></div><div>i have found surprising  behavior of function lists:append/1: </div><div><br></div><div>spec and documentation  are in a agreement that this function should accept lists of lists ( [List] ) , </div><div>and return list of T ( [T] ), however when we use function like: </div><div> </div><div>     lists:append([a]) %wrong input parameter </div><div>one gets: </div><div>     a  % wrong type of a return </div><div><br></div><div>implementation assumes correct type: </div><div><br></div><div>append([E]) -> E; % E is not checked for type <br>append([H|T]) -> H ++ append(T);<br>append([]) -> [].<br></div><div><br></div><div>simple solution could be: <br><br>lists:append([E]) when is_list(E) -> E <br><br></div><div>am i missing something? </div><div><br></div></div>