Navigation
Synopsis Indexes a binary relation as a map
Function map[&K, set[&V]] index(rel[&K, &V] R)
Usage import Relation;
Description Converts a binary relation to a map of the domain to a set of the range.
Examples
rascal>import Relation;
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.