I want to give a tuple to a printf function:
let tuple = ("Hello", "world")
do printfn "%s %s" tuple
This, of course, does not work, compiler first says, that it needs string instead of string*string. I write it as follows:
let tuple = ("Hello", "world")
do printfn "%s %s" <| fst tuple
Then compiler reasonably notes that now I have function value of type string -> unit. Makes sense. I can write
let tuple = ("Hello", "world")
do printfn "%s %s" <| fst tuple <| snd tuple
And it works for me. But I'm wondering, if there might be any way to do it nicer, like
let tuple = ("Hello", "world")
do printfn "%s %s" <| magic tuple
My problem is that I can't get which type does printf need so that to print two arguments.
What could magic function look like?