Navigation
Synopsis A relation restricted to certain element values in tuples.
Function
  1. rel[&T,&T] carrierR (rel[&T,&T] R, set[&T] S)
  2. rel[&T,&T,&T] carrierR (rel[&T,&T,&T] R, set[&T] S)
  3. rel[&T,&T,&T,&T] carrierR (rel[&T,&T,&T,&T] R, set[&T] S)
  4. rel[&T,&T,&T,&T,&T] carrierR (rel[&T,&T,&T,&T,&T] R, set[&T] S)
Usage import Relation;
Description Returns relation R restricted to tuples with elements in set S.
Examples
rascal>import Relation;
ok
rascal>carrierR({<1,10>, <2,20>, <3,30>}, {10, 1, 20});
rel[int,int]: {<1,10>}

Questions
Question [1].
The type of carrierR({<1, 15>, <8, 11>}, {6}) is

Question [2].
carrierR({<5, 10>, <1, 16>, <3, 19>, <3, 10>, <0, 16>}, {15, 5, 6}) == 



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.