# File lib/openid/yadis/filters.rb, line 163
    def self.mk_compound_filter(parts)

      if !parts.respond_to?('each')
        raise TypeError, "#{parts.inspect} is not iterable"
      end

      # Separate into a list of callables and a list of filter objects
      transformers = []
      filters = []
      parts.each { |subfilter|
        if !subfilter.is_a?(Array)
          # If it's not an iterable
          if subfilter.respond_to?('get_service_endpoints')
            # It's a full filter
            filters << subfilter
          elsif subfilter.respond_to?('from_basic_service_endpoint')
            # It's an endpoint object, so put its endpoint conversion
            # attribute into the list of endpoint transformers
            transformers << subfilter.method('from_basic_service_endpoint')
          elsif subfilter.respond_to?('call')
            # It's a proc, so add it to the list of endpoint
            # transformers
            transformers << subfilter
          else
            raise @@filter_type_error
          end
        else
          filters << mk_compound_filter(subfilter)
        end
      }

      if transformers.length > 0
        filters << TransformFilterMaker.new(transformers)
      end

      if filters.length == 1
        return filters[0]
      else
        return CompoundFilter.new(filters)
      end
    end