I'm very new to F# so please excuse the completely newbie question:
I have a sequence stored in a variable called prices. I'd like to output the contents of this sequence to the interactive window. What's the easiest command to do this?
Here is my sequence:
> prices;;
val it : seq<System.DateTime * float> = seq []
I've tried printf'ing it but that gives me the error:
> printf("%A", prices);;
printf("%A", prices);;
-------^^^^^^^^^^^^
stdin(82,8): error FS0001: The type ''b * 'c' is not compatible with the type 'Printf.TextWriterFormat<'a>'
Any help would be appreciated.
printf does not take parentheses:
printfn "%A" prices;;
(See F# function types: fun with tuples and currying for details)
You might also convert the seq to a list, e.g.
printfn "%A" (Seq.toList prices);;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With