diff options
author | Paul Steckler <steck@stecksoft.com> | 2017-07-12 11:16:09 -0400 |
---|---|---|
committer | Paul Steckler <steck@stecksoft.com> | 2017-07-12 11:16:09 -0400 |
commit | bcfcf891563bcbf1d39a60275cabd695be162eee (patch) | |
tree | b2fd44bcd8503ef39452e35deb3b730fb7183c45 /lib/pp.mli | |
parent | ba7129f547d1f06c7eb67412404445681d22b920 (diff) |
format pairs of items for pr_depth to get alternating separators
eval thunks once in prlist_sep_lastsep, make code clearer
add typeclass debug output test
Diffstat (limited to 'lib/pp.mli')
-rw-r--r-- | lib/pp.mli | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pp.mli b/lib/pp.mli index be255a74f..96656c8b6 100644 --- a/lib/pp.mli +++ b/lib/pp.mli @@ -145,7 +145,10 @@ val prlist_strict : ('a -> std_ppcmds) -> 'a list -> std_ppcmds val prlist_with_sep : (unit -> std_ppcmds) -> ('a -> std_ppcmds) -> 'a list -> std_ppcmds (** [prlist_with_sep sep pr [a ; ... ; c]] outputs - [pr a ++ sep() ++ ... ++ sep() ++ pr c]. *) + [pr a ++ sep () ++ ... ++ sep () ++ pr c]. + where the thunk sep is memoized, rather than being called each place + its result is used. +*) val prvect : ('a -> std_ppcmds) -> 'a array -> std_ppcmds (** As [prlist], but on arrays. *) |