diff --git a/implementations/Ocaml/helloworld/bin/main.ml b/implementations/Ocaml/helloworld/bin/main.ml index 441c395..0d194a1 100644 --- a/implementations/Ocaml/helloworld/bin/main.ml +++ b/implementations/Ocaml/helloworld/bin/main.ml @@ -81,7 +81,9 @@ let rec expect_right_bracket tokens acc = match head with | Right_bracket -> acc, tail | Left_bracket -> + (* extract the sub-list *) let sub_list, rest = expect_right_bracket tail [] in + (* continue looking for the expected "]" *) let el, rrest = expect_right_bracket rest acc in JoyList sub_list :: el, rrest | Token tok ->