Exemplo n.º 1
0
def interpret_list(asker, view, l):
    #TODO if I had better mapping, this would be fine...
    #for now I have to do it in this terrible way...
    result = representations.make(T.empty_list.head)
    for x in reversed(list(lists.iterator(asker, l))):
        result = representations.make(T.cons.head, head=x, tail=result)
    return asker.reply(answer=result)
Exemplo n.º 2
0
def lift(asker, repr, update):
    return asker.reply(answer=representations.make(
        held_update.head, 
        update=representations.quote(update), 
        object=repr
    ))
Exemplo n.º 3
0
def make_term(asker, computation_bindings, head, bindings):
    return asker.reply(answer=representations.make(
        strings.to_str(asker, head),
        dictionaries.to_term_bindings(asker, bindings)
    ))