def sum_progresses(progresses, criterion_type, maxFunc):
    'Adds together a list of Progress objects by combining them one by one\n    criterion_type: either subjects or units\n    maxFunc: describes how to combine the maximums of the Progress objects'
    if (criterion_type == CRITERION_SUBJECTS):
        mapfunc = (lambda p: p.subject_fulfillment)
    elif (criterion_type == CRITERION_UNITS):
        mapfunc = (lambda p: p.unit_fulfillment)
    sum_progress = reduce((lambda p1, p2: p1.combine(p2, maxFunc)), map(mapfunc, progresses))
    return sum_progress
Adds together a list of Progress objects by combining them one by one
criterion_type: either subjects or units
maxFunc: describes how to combine the maximums of the Progress objects
def sum_progresses(progresses, criterion_type, maxFunc):
    'Adds together a list of Progress objects by combining them one by one\n    criterion_type: either subjects or units\n    maxFunc: describes how to combine the maximums of the Progress objects'
    if (criterion_type == CRITERION_SUBJECTS):
        mapfunc = (lambda p: p.subject_fulfillment)
    elif (criterion_type == CRITERION_UNITS):
        mapfunc = (lambda p: p.unit_fulfillment)
    sum_progress = reduce((lambda p1, p2: p1.combine(p2, maxFunc)), map(mapfunc, progresses))
    return sum_progress