First of all, this function already exists, so you do not need to implement it yourself. In fact, a list can take two lists as arguments:
1> lists:append([1,2,3,4,5], [6,7]).
[1,2,3,4,5,6,7]
:
2> [1,2,3,4,5] ++ [6,7].
[1,2,3,4,5,6,7]
, , ++ , . , , , "cons" ( , ):
3> [1|[2,3,4,5,6,7]].
[1,2,3,4,5,6,7]
, , , . , A B , my_append/2.
my_append(A, B) ->
YOUR_CODE_GOES_HERE
, , - :
B = lists:append(B, [ListA])
B, [6,7].