Last active
October 2, 2015 17:54
-
-
Save camlspotter/a8952a5fdf7298c59b9b to your computer and use it in GitHub Desktop.
hov_box vs box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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