【发布时间】:2021-02-16 18:20:13
【问题描述】:
我想解析给定的char 两次,但只返回该字符的string 一次。
例如:
aa -> a
我有一些代码可以工作,但也有一些代码不能工作,我不明白为什么。
为什么这些 sn-ps 不同?
// Works
let parseEscapedQuote (c : char) =
let q = string c
pstring (q + q) >>% q
// Does not work
let parseEscapedQuote (c : char) =
let q = string c
pchar c >>. pchar c >>% q
【问题讨论】: