package trail

  1. Overview
  2. Docs

Source file pipeline.ml

1
2
3
4
5
6
7
8
9
10
11
12
type trail = Connection.t -> Connection.t
type t = trail list

let rec run_pipeline t conn =
  match t with
  | [] -> conn
  | trail :: t ->
      let conn = trail conn in
      if Connection.halted conn then conn else run_pipeline t conn

let run (conn : Connection.t) t =
  if Connection.halted conn then conn else run_pipeline t conn