Jon and Joe have received equal marks in the school examination. But, they won't reconcile in peace when equated with each other. To prove his might, Jon challenges Joe to write a program to find all possible number combos that sum to a given number. While unsure whether he would be able to accomplish this feat or not, Joe accpets the challenge. Being Joe's friend, your task is to help him out.
# Task
Create a function `combos`, that accepts a single positive integer `num` (30 > `num` > 0) and returns an array of arrays of positive integers that sum to `num`.
# Notes
1. Sub-arrays may or may not have their elements sorted.
2. The order of sub-arrays inside the main array does not matter.
3. For an optimal solution, the following operation should complete within 6000ms.
# Sample
def combos(n):
    def partition(residue, acc):
        if residue == 0:
            yield acc[1:]
        else:
            for part in range(acc[-1], residue + 1):
                for result in partition(residue - part, acc + [part]):
                    yield result

    return list(partition(n, [1]))

def combos(n):
    def partition(residue, acc):
        if residue == 0:
            yield acc[1:]
        else:
            for part in range(acc[-1], residue + 1):
                for result in partition(residue - part, acc + [part]):
                    yield result

    return list(partition(n, [1]))
