def get *key_path, type: nil, default: nil
    first, *rest = key_path
    entry = @trie.get first

    value = if entry
      current = entry[ 1 ]

      while !current.nil? && !rest.empty?
        first, *rest = rest

        current = if current.respond_to? :dig
          rest = [] # Short-circuit
          current.dig *rest

        elsif current.respond_to? :[]
          current[ first ]
        
        elsif current.respond_to? :get
          current.get first
        
        else
          rest = []
          default

        end
      end

      current

    else
      default
    end

    parse_and_check key_path, value, type: type

  end
def get *key_path, type: nil, default: nil
    first, *rest = key_path
    entry = @trie.get first

    value = if entry
      current = entry[ 1 ]

      while !current.nil? && !rest.empty?
        first, *rest = rest

        current = if current.respond_to? :dig
          rest = [] # Short-circuit
          current.dig *rest

        elsif current.respond_to? :[]
          current[ first ]
        
        elsif current.respond_to? :get
          current.get first
        
        else
          rest = []
          default

        end
      end

      current

    else
      default
    end

    parse_and_check key_path, value, type: type

  end
.deep_trie_merge
 Attributes
 ========================================================================
 Construction
 ========================================================================
 Instantiate a new `Config`.
 #initialize
 Instance Methods
 ========================================================================
 Retrieve the value corresponding to the provided key object. If not found,
 and this `Hash` has a default block, the default block is called to provide
 the value. Otherwise, return `nil`.

 @example
   h = Hamster::Hash["A" => 1, "B" => 2, "C" => 3]
   h["B"]             # => 2
   h.get("B")         # => 2
   h.get("Elephant")  # => nil

   # Hamster Hash with a default proc:
   h = Hamster::Hash.new("A" => 1, "B" => 2, "C" => 3) { |key| key.size }
   h.get("B")         # => 2
   h.get("Elephant")  # => 8

 @param [Array<Object>] key_path
   The key to look up
 @return [Object]