def apply_primitive_procedure(proc, args): func = primitive_implementation(proc) return func(*pair_to_list(args))
def extend_environment(variables, values, env): bindings = dict(zip( [var.val for var in pair_to_list(variables)], pair_to_list(values))) env = Environment(parent=env, bindings=bindings) return env