In the following F# code; I would expect that the printfn
is being called three times; each with a string. However, the bottom line does not compile (The type 'string' is not compatible with the type 'Printf.TextWriterFormat<'a>'
).
What is it about the first two lines that means this can work? Aren't they just strings too?
open System
printfn ("
") // Works
printfn ("DANNY") // Works
printfn (DateTime.Now.ToLongTimeString()) // Doesn't compile
See Question&Answers more detail:os