Include Session
fn include_session<N, C1, C2, A, B>(
session: Session<A>,
cont: impl FnOnce(N) -> PartialSession<C2, B>,
) -> PartialSession<C1, B>
Nis the length ofC1.C1is in the formHList![0: A0, 1: A1, ...]C2is in the formHList![0: A0, 1: A1, ..., N: A], withAappended to the end ofC1and the remaining elements unchanged.
Example
let p1: Session<End> = terminate();
let p2: Session<End> = include_session(p1, move |c| wait(c, terminate()));