sig
  type 'a t
  val create : unit -> 'Tail.t
  val extend : 'Tail.t -> '-> unit
  val close_exn : 'Tail.t -> unit
  val close_if_open : 'Tail.t -> unit
  val is_closed : 'Tail.t -> bool
  module Stream :
    sig
      type 'a t
      type 'a next = Nil | Cons of 'a * 'Tail.Stream.t
      val next : 'Tail.Stream.t -> 'Tail.Stream.next Deferred.t
      val sexp_of_t :
        ('-> Sexplib.Sexp.t) -> 'Tail.Stream.t -> Sexplib.Sexp.t
    end
  val collect : 'Tail.t -> 'Tail.Stream.t
  val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'Tail.t -> Sexplib.Sexp.t
end