有没有更干净的方法?我试图做的,我发现一个 (a' option * (char * nodeType) list ref 的唯一途径模式匹配是这样: match a with
| _, l -> match !l with
| (c, n)::t -> doSomething
会不会有一种方法来匹配a别的东西一样。 .. match a with
| _, ref (c,n):
下面的代码只是一种原型。我想知道的是为什么它不能编译。 fun test(list) =
let
fun inner(list) =
let
val from = #1(hd(list))
in
if null(tl(list)) = false then innerinner(tl(list),from)
else f