我正在创建一个将由 C# 代码使用的模块,所以我宁愿不LazyList<>
直接返回。如果我这样做了,C# 将不得不引用FSharp.PowerPack
,这看起来很奇怪。
所以我宁愿返回 a IList<>
,但是当我尝试做类似的事情时:
let x = LazyList.ofSeq {0..10}
let y = x :> IList<int32>
但是,这给了我错误:
The type 'LazyList<int> is not compatible with the type 'IList<int>'
这让我相信LazyList<>
不是implement
IList<>
。这是真的?
我错过了什么?