package Ġorg . k lips . engine . re te . builder Ċ Ċ import Ġorg . k lips . dsl . Fact Ċ import Ġorg . k lips . engine . query . Binding Set Ċ import Ġorg . k lips . engine . query . Fact Binding Set Ċ import Ġorg . k lips . engine . query . Join Binding Set Ċ import Ġorg . k lips . engine . query . Join Binding Set . Join Type Ċ Ċ object ĠUtil Ġ{ ĊĊĠĠĠ Ġfun Ġselect ( facts : Collection < Fact >, Ġp att : Collection < Fact >, Ġjoin Type : ĠJoin Type Ġ= ĠJoin Type . Inner ) Ġ= Ġp att . map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠFact Binding Set ( it , Ġfacts ) ĊĠĠĠĠĠĠĠ Ġ}. reduce < Binding Set , ĠFact Binding Set > Ġ{ Ġl , Ġr Ġ-> Ġ ĠJoin Binding Set ( l , r , Ġjoin Type )} Ċ Ċ }