mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-08 04:05:30 -05:00
doc
This commit is contained in:
parent
a17f8d5cfb
commit
0a9317ae26
1 changed files with 4 additions and 3 deletions
|
|
@ -40,9 +40,10 @@ let mk_leaf x = L x
|
||||||
let mk_node x y = N(x,y)
|
let mk_node x y = N(x,y)
|
||||||
|
|
||||||
let ptree = fix @@ fun self ->
|
let ptree = fix @@ fun self ->
|
||||||
(char '(' *> (pure mk_node <*> self <* skip_chars is_space <*> self) <* char ')')
|
skip_space *>
|
||||||
<|>
|
( (char '(' *> (pure mk_node <*> self <*> self) <* char ')')
|
||||||
(U.int >|= mk_leaf)
|
<|>
|
||||||
|
(U.int >|= mk_leaf) )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
parse_string_exn "(1 (2 3))" ptree;;
|
parse_string_exn "(1 (2 3))" ptree;;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue