0
这不起作用... 我得到错误FS0001:类型'字符串'与最后一行的类型'seq' 不兼容。为什么?此F#代码不起作用
let rec Parse (charlist) =
match charlist with
| head :: tail -> printf "%s " head
Parse tail
| [] -> None
Parse (Seq.toList "this is a sentence.") |> ignore
Seq对一个序列进行操作,字符串不是一个序列。 – Lazarus
有人可以请“编辑”该问题的标题..使其更容易。 thx – bastianneu
@Lazarus - 字符串是一个序列,但它是一个字符序列,其中Parse的推断类型需要一串字符串。 – kvb