mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 11:45:31 -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 ptree = fix @@ fun self ->
|
||||
(char '(' *> (pure mk_node <*> self <* skip_chars is_space <*> self) <* char ')')
|
||||
<|>
|
||||
(U.int >|= mk_leaf)
|
||||
skip_space *>
|
||||
( (char '(' *> (pure mk_node <*> self <*> self) <* char ')')
|
||||
<|>
|
||||
(U.int >|= mk_leaf) )
|
||||
;;
|
||||
|
||||
parse_string_exn "(1 (2 3))" ptree;;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue