在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