So, if you want to write a line to the console in F #, follow these steps:
System.Console.WriteLine "foo"
Initially, I thought the following was almost identical, just more detailed, but in fact it gives the error "Unique overload for the WriteLine method cannot be determined based on the type information up to this point in the program":
(fun line -> System.Console.WriteLine line) "foo"
The second version seems to be confused by the presence of overloaded WriteLine methods that take a string, as well as other arguments. Is my guess the right lines?
source
share