def exhaust(f):
    tree = ChoiceTree()

    results = []

    prefix = ()

    while not tree.exhausted:
        prefix = tree.step(prefix_selection_order(prefix),
                           lambda chooser: results.append(f(chooser)))
    return results
Пример #2
0
def select(*args):
    return prefix_selection_order(args)