Conjuction (any_of and all_of) implementation