プログラムでよく使うのでPrintf.fprintf stdout ...
、短い関数で名前を変更したいと思います。だから私は書く:
let p = Printf.fprintf stdout
そして、うまくいくことを願っp "%s" "string"
ています。ただし、コンパイルでエラーが発生します。
File "lib/utility.ml", line 27, characters 8-29:
Error: The type of this expression, ('_a, out_channel, unit) format -> '_a,
contains type variables that cannot be generalized
アプリケーションをできるだけシンプルにするために名前を変更するアイデアはありますか?