pub fn apply_channel<A, B>(
    f: PartialSession<(), ReceiveChannel<A, B>>,
    a: PartialSession<(), A>
) -> PartialSession<(), B> where
    A: Protocol,
    B: Protocol