English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang List append method

Erlang List

returns a new list List3, the list is composed of List1elements and List2elements composition.

syntax

append(List1,List2)

parameters

  • List1 −the first value list.

  • List2 −the second value list.

return value

returns a new list List3, the list is composed of List1elements and List2elements composition.

-module(helloworld). 
-import(lists,[append/2]. 
-export([start/ 
start() -> 
   Lst1 = [1,2,3], 
   Lst2 = append(Lst1,4,5]), 
   io:fwrite("~w~n",[Lst2].

When we run the above program, we will get the following results.

[1,2,3,4,5]

Erlang List