(x: T, func_a: Callable[[T], T], func_b: Callable[[T], T])
Run `func_a` and `func_b` on `x` until func_b(func_a(x)) == x
    :param x: 
    :param func_a: A function satisfying func_a(func_a(x)) == func_a(x)
    :param func_b: A function satisfying func_b(func_b(x)) == func_b(x)
    :return: the x that satisfies func_b(func_a(x)) == x
Run `func_a` and `func_b` on `x` until func_b(func_a(x)) == x
    :param x: 
    :param func_a: A function satisfying func_a(func_a(x)) == func_a(x)
    :param func_b: A function satisfying func_b(func_b(x)) == func_b(x)
    :return: the x that satisfies func_b(func_a(x)) == x
Run func_a and func_b on x until func_b ( func_a ( x )) == x : param x : : param func_a : A function satisfying func_a ( func_a ( x )) == func_a ( x ) : param func_b : A function satisfying func_b ( func_b ( x )) == func_b ( x ) : return : the x that satisfies func_b ( func_a ( x )) == x
def fixed_point(x: T, func_a: Callable[[T], T], func_b: Callable[[T], T]) -> T:
    """
    Run `func_a` and `func_b` on `x` until func_b(func_a(x)) == x
    :param x: 
    :param func_a: A function satisfying func_a(func_a(x)) == func_a(x)
    :param func_b: A function satisfying func_b(func_b(x)) == func_b(x)
    :return: the x that satisfies func_b(func_a(x)) == x
    """
    x = func_a(x)
    x = func_b(x)
    while True:
        y = func_a(x)
        if y == x:
            # Since func_b(func_b(x)) == func_b(x),
            # we are already at the fixed point if
            # `y == x`
            return x
        x = y
        y = func_b(x)
        if y == x:
            return x
        x = y
def fixed_point ( x : T , func_a : Callable [ [ T ] , T ] , func_b : Callable [ [ T ] , T ] ) -> T : x = func_a ( x ) x = func_b ( x ) while True : y = func_a ( x ) if y == x : # Since func_b(func_b(x)) == func_b(x), # we are already at the fixed point if # `y == x` return x x = y y = func_b ( x ) if y == x : return x x = y