Exemple #1
0
def map_reify(state, container):
    acc = (state.gen_sym, immutabledict())
    acc, new_container = map_accum(_reify_func, acc, container)
    gen_sym, bindings = acc

    new_state = state.update(gen_sym=gen_sym, temp_bindings=state.temp_bindings.update(bindings))

    return new_state, new_container
Exemple #2
0
def map_get_value(container):
    _, new_container = map_accum(lambda acc, kvalue: (acc, kvalue.value), None, container)
    return new_container
Exemple #3
0
def map_peval_expression(state, container, ctx):
    return map_accum(_peval_expression, state, container, ctx)