F#でPrintfnするのにハマった
open System [<EntryPoint>] let main argv = let a = "str" printfn a 0
コンパイルエラー The type 'string' is not compatible with the type 'Printf.TextWriterFormat<'a>'
が発生。
どういうこと……?
F# printf string - Stack Overflow
なるほど。
open System [<EntryPoint>] let main argv = let a = "str" printfn "%s" a 0
こうする必要があるらしい。
open System [<EntryPoint>] let main argv = let a = 1 printfn "%d" a 0
数値はこう。