Navigation
Synopsis Domain of a list relation: a list consisting of the first element of each tuple.
Function
  1. list[&T0] domain (lrel[&T0,&T1] R)
  2. list[&T0] domain (lrel[&T0,&T1,&T2] R)
  3. list[&T0] domain (lrel[&T0,&T1,&T2,&T3] R)
  4. list[&T0] domain (lrel[&T0,&T1,&T2,&T3,&T4] R)
Usage import ListRelation;
Examples
rascal>import ListRelation;
ok
rascal>domain([<1,10>, <2,20>]);
list[int]: [1,2]
rascal>domain([<"mon", 1>, <"tue", 2>]);
list[str]: ["mon","tue"]

Questions
Question [1].
The type of domain([<"Countess Von Backwards", 17>, <"Curry", 11>, <"Kiwifruit", -12>]) is

Question [2].
domain([<"Little Bird", -5>, <"P", 1>, <"Hoots The Owl", -10>, <"Count Von Count", 8>]) == 



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.