Navigation
Synopsis Get a n arbitrary key from a map.
Function &K getOneFrom(map[&K, &V] M)
Usage import Map;
Description Returns an arbitrary key of map M.
Examples
rascal>import Map;
ok
rascal>getOneFrom(("apple": 1, "pear": 2, "pineapple": 3));
str: "pear"
rascal>getOneFrom(("apple": 1, "pear": 2, "pineapple": 3));
str: "apple"
rascal>getOneFrom(("apple": 1, "pear": 2, "pineapple": 3));
str: "apple"
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.