Commits

Yaron Minsky committed 9f382d3

simplified sexp printing

  • Participants
  • Parent commits 0db77df

Comments (0)

Files changed (2)

 (* A strand identifier on the interval *)
 module Strand : Private_int.S = Private_int.M
 
+let sexp_print conv v =
+  v |> conv |> Sexp.to_string_hum |> print_endline
     ~widths:[6;2;3;4;2]
 
 let () =
-  iet
-  |> <:sexp_of<Iet.t>>
-  |> Sexp.to_string_hum
-  |> print_endline
+  sexp_print <:sexp_of<Iet.t>> iet
 
 let print_cycle (strand,side) =
   Iet_utils.find_cycle iet (Strand.of_int strand,side) 
-  |> <:sexp_of<(Strand.t * Side.t) list>>
-  |> Sexp.to_string_hum
-  |> print_endline
+  |> sexp_print <:sexp_of<(Strand.t * Side.t) list>>
 
 let () =
   print_cycle (0,Top);