Closed UnixJunkie closed 9 years ago
Cf. https://groups.google.com/forum/#!topic/fa.caml/fOfJVpHywW0 text from Gabriel Scherer:
let delayed_sprintf fmt = Printf.sprintf (fmt ^^ "%s");; # let result = Printf.sprintf "%d) %s\n" 3 "foo";; val result : string = "3) foo\n" # let thunk = delayed_sprintf "%d) %s\n" 3 "foo";; val thunk : string -> string = <fun> # thunk "";; - : string = "3) foo\n"
done
Cf. https://groups.google.com/forum/#!topic/fa.caml/fOfJVpHywW0 text from Gabriel Scherer: