返回列表中具有最大值的元素。
max - 语法
max(lst1)
Lst1 - 元素列表。
max - 返回值
返回列表中具有最大值的元素。
-module(helloLearnfk). -import(lists,[max/1]). -export([start/0]).start() -> Lst1=[1,2,3,4], io:fwrite("
wn",[max(Lst1)]).
当我们运行上述程序时,我们将得到以下输出。
4
返回列表中具有最大值的元素。
max(lst1)
Lst1 - 元素列表。
返回列表中具有最大值的元素。
-module(helloLearnfk). -import(lists,[max/1]). -export([start/0]).start() -> Lst1=[1,2,3,4], io:fwrite("
wn",[max(Lst1)]).
当我们运行上述程序时,我们将得到以下输出。
4