Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
hov_box vs box
open Format
let rec hovb ppf = function
| 0 -> ()
| n ->
fprintf ppf "(@[<hov>-----------------------------------%03d@," n;
hovb ppf (n-1);
fprintf ppf "@])"
let rec b ppf = function
| 0 -> ()
| n ->
fprintf ppf "(@[<>-----------------------------------%03d@," n;
b ppf (n-1);
fprintf ppf "@]@,)"
let rec hovb' ppf = function
| 0 -> ()
| n ->
fprintf ppf "(@[<hov>-----------------------------------%03d@," n;
hovb' ppf (n-1);
fprintf ppf "@]@,)"
let () =
eprintf "@[%a@]@." hovb 3;
eprintf "@[%a@]@." b 3;
eprintf "@[%a@]@." hovb' 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.