Navigation
Synopsis Test whether a list is empty.
Function bool isEmpty(list[&T] lst)
Usage import List;
Description Returns true when a list is empty and false otherwise.
Examples
rascal>import List;
ok
rascal>isEmpty([]);
bool: true
rascal>isEmpty([1, 2, 3]);
bool: false

Questions
Question [1].
The type of isEmpty(["Papaya", "Garlic", "Han Solo", "Dill", "Grapefruit", "Elmo"]) is

Question [2].
isEmpty(["Darth Vader", "R", "Obi-Wan Kenobi", "Luke Skywalker", "Isolder"]) == 



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.