Synopsis Convert a list to a relation.
Function rel[&T,&T] toRel(list[&T] lst)
Usage import List;
Description Convert a list to relation, where each tuple encodes which elements are followed by each other. This function will return an empty relation for empty lists and for singleton lists.
rascal>import List;
rascal>toRel([3, 1, 4, 5]);
rel[int,int]: {
rascal>toRel(["zebra", "elephant", "snake", "owl"]);
rel[str,str]: {

Question [1].
The type of toRel([11, 8, 0, 11]) is

Question [2].
toRel(["Bruno", "Dill", "Blackcurrant", "I"]) == 

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