Maps a relation over the tuples in this tuple set, and get a new tuple predicate back representing the related values to the tuples in this set.
Sibling module of Map (which takes a “function” instead of a “relation”).
Note that this implicitly performs an intersection with the domain tuple set of the given relation.
Example:
predicate livesIn(Person p, City c) { c = p.getCity() }
Address hasMailingAddress(Person p, City c) { ... }
// Selects the mailing addresses that correspond to the people, city in `livesIn`.
select Tp2<Person, City, livesIn/2>::Relate<Address, hasMailingAddress/2>::find()
To preserve Person, City, see ExtendRelate.
Import path
import qtil.fn.generated.TpPredicates
| find | Get the result of mapping the relation |