English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
リストの中で最大値を持つ要素を返します。
max(lst1)
Lst1 −要素リスト。
リストの中で最大値を持つ要素を返します。
-module(helloworld). -import(lists,[max/1]). -export([start/0]). start() -> Lst1 = [1,2,3,4], io:fwrite("~w~n",[max(Lst1)]).
上記のプログラムを実行すると、以下のような結果が得られます。
4