transitive_closure/3

transitive_closure(+ Graph, + Closure)*

Generate the graph Closure as the transitive closure of graph Graph. In the next example:


 ?- transitive_closure([1-[2,3],2-[4,5],4-[6]],L).

 L = [1-[2,3,4,5,6],2-[4,5,6],4-[6]]