我有以下方法:
member this.addColumnWithHeading heading column =
this.addColumn (seq { yield heading; yield! (column |> Seq.map string)})
它接受一个字符串标题和任何序列(在这种情况下被编译为 seq),创建一个字符串序列并使用该数据调用另一个方法。但是,它不适用于作为浮点序列的列:
Error 1 The type 'obj' does not match the type 'float' C:\Users\ga1009\Documents\PhD\cpp\pmi\fsharp\pmi\Program.fs 138
如何定义该方法addColumnWithHeading
以使其也适用于浮点数?