Navigation
Synopsis Listes a binary list relation as a map
Function map[&K, set[&V]] index(lrel[&K, &V] R)
Usage import ListRelation;
Description Converts a binary list relation to a map of the domain to a set of the range.
Examples
rascal>import ListRelation;
ok
rascal>index([<1,10>, <2,20>, <3,30>, <30,10>]);
map[int, set[int]]: (
  1:{10},
  2:{20},
  3:{30},
  30:{10}
)
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.