def merge(context, modifications):
    """Merge updates and deletions between initial and new maps

    Args:
        context (HAMT): Map object
        modifications (tuple): insertions and keys deleted
    Returns:
        HAMT: context with specified insertions (HAMT) and deletions (frozenset)"""
    additions, deletions = modifications
    for deletion in deletions:
        context = context.delete(deletion)
    return context.update(additions)