sig type ('a, 'b) endpoint type ('a, 'b) reagent = ('a, 'b) t val mk_chan : ?name:string -> unit -> ('a, 'b) endpoint * ('b, 'a) endpoint val swap : ('a, 'b) endpoint -> ('a, 'b) reagent end