Browse thread
Request for comments: Printf list conversion
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <damien.doligez@i...> |
| Subject: | Re: [Caml-list] Request for comments: Printf list conversion |
On Jan 12, 2006, at 10:55, Jean-Christophe Filliatre wrote: > val print_list : > ?sep:(formatter -> unit -> unit) -> > (formatter -> 'a -> unit) -> formatter -> 'a list -> unit > > which comes with a handy list of predefined separators: > > val space : formatter -> unit -> unit > val newline : formatter -> unit -> unit > val comma : formatter -> unit -> unit > val semi : formatter -> unit -> unit > val nothing : formatter -> unit -> unit Yuck. Isn't this type (formatter -> unit -> unit) isomorphic to string, in the absence of side-effects? Or do you really need separators that behave differently depending on the state of some reference? -- Damien