Navigation
Synopsis Convert a map to a relation.
Function
  1. rel[&K, &V] toRel(map[&K, &V] M)
  2. rel[&K,&V] toRel(map[&K,set[&V]] M)
  3. rel[&K,&V] toRel(map[&K,list[&V]] M)
Usage import Map;
Examples
rascal>import Map;
ok
rascal>toRel(("apple": 1, "pear": 2, "orange": 3));
rel[str,int]: {
  <"pear",2>,
  <"orange",3>,
  <"apple",1>
}
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.