def rec_cmp_releases(one, two):
    """Recursive function that compares two version strings represented as lists
    to determine which one comes "after" / takes precedence, or if they are equivalent.

    List items must be integers (will throw TypeError otherwise).

    If the left argument ("one") is a later version, returns 1.
    If the right argument ("two") is a later version, returns 2.
    If they are equivalent, returns 0.

    :param one: list of ints to compare to two
    :param two: list of ints to compare to one
    :returns: code in (0, 1, 2)
    :rtype: int
    """
    # we've exhausted all three levels of comparison, so logically we're at equivalence.
    if len(one)==0:
        return 0

    top1 = one[0]
    top2 = two[0]

    if top1 > top2:
        return 1
    elif top1 < top2:
        return 2
    else:
        return rec_cmp_releases(one[1:], two[1:])