avoid temporary storage of clauses in list object by using generator