def merge(other)
      other = Erlang.from(other)
      trie = if block_given?
        other.reduce(@trie) do |acc, (key, value)|
          if entry = acc.get(key)
            acc.put(key, yield(key, entry[1], value))
          else
            acc.put(key, value)
          end
        end
      else
        @trie.bulk_put(other)
      end

      return derive_new_map(trie)
    end
def merge(other)
      other = Erlang.from(other)
      trie = if block_given?
        other.reduce(@trie) do |acc, (key, value)|
          if entry = acc.get(key)
            acc.put(key, yield(key, entry[1], value))
          else
            acc.put(key, value)
          end
        end
      else
        @trie.bulk_put(other)
      end

      return derive_new_map(trie)
    end
Return a new `Map` containing all the key/value pairs from this `Map` and
 `other`. If no block is provided, the value for entries with colliding keys
 will be that from `other`. Otherwise, the value for each duplicate key is
 determined by calling the block.

 `other` can be a `Erlang::Map`, a built-in Ruby `Map`, or any `Enumerable`
 object which yields `[key, value]` pairs.

 @example
   m1 = Erlang::Map["A" => 1, "B" => 2, "C" => 3]
   m2 = Erlang::Map["C" => 70, "D" => 80]
   m1.merge(m2)
   # => Erlang::Map["C" => 70, "A" => 1, "D" => 80, "B" => 2]
   m1.merge(m2) { |key, v1, v2| v1 + v2 }
   # => Erlang::Map["C" => 73, "A" => 1, "D" => 80, "B" => 2]

 @param other [::Enumerable] The collection to merge with
 @yieldparam key [Object] The key which was present in both collections
 @yieldparam my_value [Object] The associated value from this `Map`
 @yieldparam other_value [Object] The associated value from the other collection
 @yieldreturn [Object] The value to associate this key with in the new `Map`
 @return [Map]