'Fix elements that should accumulate/increment values.'

def fix_repeating_arguments(self):

    either = [list(child.children) for child in transform(self).children]
    for case in either:
        for e in [child for child in case if (case.count(child) > 1)]:
            if ((type(e) is Argument) or ((type(e) is Option) and e.argcount)):
                if (e.value is None):
                    e.value = []
                elif (type(e.value) is not list):
                    e.value = e.value.split()
            if ((type(e) is Command) or ((type(e) is Option) and (e.argcount == 0))):
                e.value = 0
    return self
