def comparison(criteria, tree1, tree2):
    """ Return differences between two trees as requested in criteria
    
        >>> criteria
        [('Added', added),      # added is a function
         ('Removed', removed)]
        >>> comparison(tree1, tree2, criteria)
        [('Added', [files...]),
         ('Removed', [files...])]

    """

    results = []
    for label, fn in criteria:
        data = fn(tree1, tree2)
        results += [(label, sorted(data))]
    
    return results