def dissoc(key, obj):
    """Remove ("associate") "key" from "obj". "obj" should be a dictionary-like
    object. The return value will always be a dict, casting the original
    argument as needed.
    """
    new_obj = dict(obj)
    if key in new_obj:
        new_obj.pop(key)
    return new_obj
