implemented debruijncloseddomain which returns every closed subexpression of a specfic type