【发布时间】:2017-03-21 06:23:03
【问题描述】:
我正在使用XMLHelper.XMLRead 读取 FAKE 脚本中的 XML 文件,但它会引发错误,即
The type '(string -> string ->seq<string>)' is not a type whose value can be enumerated with this syantax , i.e. is not compatible with either seq<_>,IEnumerable<_> or IEnumerable and does not have a GetEnumerator method
下面是我的代码:
let x = XMLHelper.XMLRead true "D:/test/Version.Config" "/version/major/minor"
Target "New" (fun _ ->
for i in x do
printf "%s" i
)
【问题讨论】:
-
您正在返回一个部分应用的函数并尝试枚举它。您可能需要更多 XMLRead 参数。
标签: f# f#-interactive f#-3.0 f#-data f#-fake