3

I'm building TrueSkill, the F# app, from 2008, on Mono 3.0 with F# 3.0. The two errors I get are

fList |> ResizeArray.iter (fun f -> f.ResetMarginals()) and

let sumLogS = fList |> ResizeArray.fold_left (fun acc f -> acc + (f.LogNormalisation ())) 0.0.

For F# 1.9, ResizeArray came from the PowerPack. Apparently there's a PowerPack on github now. But the standard Mono docs show that ResizeArray<T> is just an alias for List<T>. Do I need to get the original ResizeArray, and if so, how would I do just that from the PowerPack, using the ResizeArray.fs? What's the current relationship between List and ResizeArray?

4

1 回答 1

3

澄清一下,ResizeArray<'T>也是List<'T>.NET 中的别名。ResizeArrayF# PowerPack 仅提供模块中的高阶函数。

因为对这个模块没有依赖,所以建议直接将ResizeArray.fs复制到你的项目中。您可能必须更改一些函数名称以匹配新ResizeArray模块,例如更改fold_leftfold和。fold_rightfoldBack

于 2012-10-25T06:25:14.957 回答