def rec_fact(num):
    """rec_fact(int) -> int

    Recursive function which takes an integer and computes the factorial.

    >>> rec_fact(4) # 4*3*2*1 = 24
    24
    """
    if not isinstance(num, int):
        raise TypeError("Must be a positive int")

    if num == 0:
        return 1

    return num * rec_fact(num - 1)