def max_rl(din):
    """
        A MAX function should "go high" only when all of
        its inputs have arrived. Thus, AND gates are 
        used for its implementation.

        Input: a list of 1-bit WireVectors
        Output: a 1-bit WireVector
    """
    if len(din) == 1:
        dout = din[0]
    else:
        dout = din[0] & max_rl(din[1:])
    return dout