Jac*_*ack 13 ocaml pattern-matching no-op
我想在完成模式匹配之后打印一个字符串列表,以进入这个强大的功能.
如何表达"无所事事但返回单位"的操作?
我的意思是:
let print_nodes nodes =
match nodes with
[] -> (* here i want to noop *)
| s :: t -> print_string s; print_nodes t
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7535 次 |
| 最近记录: |