def set_referent(asker, rep, new_value, s): import updates, dictionaries return asker.ask_tail(updates.apply_update( updates.set_field( fields.compose(bindings(), dictionaries.image(s)), new_value ), rep ))
def add_pointer_to_bottom(asker, object): visible_children = asker.ask(fields.get_field(visible_children()), object).firm_answer if convert.check_hard(asker, lists.is_empty(), visible_children): return asker.reply(answer=updates.update(is_pointer_now(), object)) else: result = updates.update(has_pointer_now(), object) result = updates.update( updates.apply_to( fields.compose(visible_children(), lists.last_element()), add_pointer_to_bottom() ), result ) return asker.reply(answer=result)
def get_referent(asker, rep, s): import dictionaries return asker.ask_tail(fields.get_field( fields.compose(bindings(), dictionaries.image(s)), rep ))
def referent_of(s): import dictionaries return fields.compose(bindings(), dictionaries.image(s))
def reduce_referent_of(asker, s): import dictionaries return asker.reply(answer=fields.compose(representations.bindings(), dictionaries.image(s)))