在F#互动,我可以使用String.Join("+", ["a"; "b"])
成功,但F#:的string.join和|>运营商
["a"; "b"] |> String.Join "+"
产生一个错误:
Script1.fsx(79,15): error FS0001: This expression was expected to have type
string list -> 'a
but here has type
string
如何使用String.Join
通过使用集合管道?
P.S.同样的问题与lines |> File.WriteAllLines "filename.txt"
谢谢!顺便说一句,有`File.WriteAllLines`的运气? – 2010-11-25 15:39:42