在我的OCaml程序,我有以下几点:匹配“*” OCaml中
let rec string_of_list p "" = match p with
[] -> "[]"
|s::rest -> String.concat " " [Bytes.to_string s; string_of_list rest ""]
这段代码嵌套多个代码中,但是当我编译它,我得到的错误:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
"*"
星星是否指Kleene外壳?我试图通过添加以下假球问题:
| _ -> "ERROR"
,但我仍然得到同样的错误。有人可以帮我吗?
谢谢!非常丰富 – Abundance