Navigation
Synopsis Invert the tuples in a list relation.
Function
  1. lrel[&T1, &T0] invert (lrel[&T0, &T1] R)
  2. lrel[&T2, &T1, &T0] invert (lrel[&T0, &T1, &T2] R)
  3. lrel[&T3, &T2, &T1, &T0] invert (lrel[&T0, &T1, &T2, &T3] R)
  4. rel[&T4, &T3, &T2, &T1, &T0] invert (rel[&T0, &T1, &T2, &T3, &T4] R)
Usage import ListRelation;
Examples
rascal>import ListRelation;
ok
rascal>invert([<1,10>, <2,20>]);
lrel[int,int]: [
  <10,1>,
  <20,2>
]

Questions
Question [1].
The type of invert([<"E", 6>, <"Darth Vader", -4>, <"Curry", 12>, <"R", -16>]) is

Question [2].
invert([<"M", "Peppermint">]) == 



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.