You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: recursively.rb
    path of file: ./repos/facets/lib/core/facets/hash
    
    the code of the file until where you have to start completion: require 'facets/functor'
require '
    
  def recursively(*types, &block)
    types = types.empty? ? [self.class] : types
    Functor.new do |op, &yld|
      rec = block || yld
      __send__(op) do |k,v|
        case v
        when *types
          rec.call(k, v.recursively(*types, &block).__send__(op,&yld))
        else
          yld.call(k,v)
        end
      end
    end