首页 文章
  • 4 votes
     answers
     views

    在OCaml中将构造函数名称转换为字符串

    我的代码中有以下类型定义: type tag = | Head | Title | Body | H1 | P;; type domtree = | Empty | Node of tag * string * domtree list;; 我需要打印标签和字符串 . 但我找不到任何方法将标记(第一个类型定义中的构造函数名称)转换为字符串,并将它们与domtree的字符串部分连接起来 . 有没...

热门问题