def if_then_else_process(guard,proc1,proc2):
    """
    Return the step function of process if guard then proc1 else proc2.

    :param guard: boolean expression
    :param proc1: process
    :param proc2: process
    :return: process function
    """
    return lambda pdef, d: proc1(pdef,d) if guard(d) else proc2(pdef,d)