English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Reverse the element list.
reverse(lst)
Lst −The element list to be reversed.
Return the reversed list of elements.
-module(helloworld). -import(lists,[reverse/1]). -export([start/0]). start() -> Lst1 = [1,2,3], io:fwrite("~p~n",[reverse(Lst1)]).
When we run the above program, we will get the following results.
[3,2,1]