Ported pi-calculus example from A.M.Pitts Fresh OCaml examples