let separate = fun formula ->
let rec aux = fun counter begin size ->
match formula.[begin + size] with
| '(' -> aux (counter + 1) begin (size + 1)
| ')' -> if (counter - 1) = 0 th
我是RationalML新手,我开始学习它。我正在尝试使用ReasonNativeProject存储库建立一个新的RationalML项目。当我使用opam pin add -y ReasonNativeProject .运行步骤以使用opam安装依赖项时,我收到以下消息,指出它无法正确安装原因。 ReasonNativeProject needs to be installed.
The fo
我试图在5课代码示例,的 Try Ocaml tutorial 步骤6我们应该解决这个代码示例: let one =
let accum = ref -54 in
for i = 1 to ten do accum := !accum + i done ;
!accum
,这里是我尝试: let one =
let accum = ref -54 in
我目前正在尝试使用Z3为具有多态列表的无类型语言编码简单程序逻辑。 据我所知,从the Z3 tutorial by Moura and Bjorner,不可能“嵌套在其他类型,如数组内的递归数据类型定义”。 因此,假设我有以下OCaml的类型: type value =
| Num of float
| String of string
| List of valu