Navigation
Synopsis Determine the largest element in a list.
Function &T max(list[&T] lst) throws EmptyList
Usage import List;
Examples
rascal>import List;
ok
rascal>max([1, 3, 5, 2, 4]);
int: 5
rascal>max(["zebra", "elephant", "snake", "owl"]);
str: "zebra"

Questions
Question [1].
The type of max(["C"]) is

Question [2].
max(["Peppermint", "Cumin"]) == 



Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.