diff options
| author | Daniil Baturin <daniil@baturin.org> | 2015-02-09 02:57:32 +0600 | 
|---|---|---|
| committer | Daniil Baturin <daniil@baturin.org> | 2015-02-09 02:57:32 +0600 | 
| commit | 9cffcca10c0319b6b603afce33aab0bdea1cdddc (patch) | |
| tree | 971130421e535b2bbe76f8fdb02c41fdb5931457 /src | |
| parent | 72569f0c5562d7ba7522b6456241567c0fcd32ac (diff) | |
| download | vyconf-9cffcca10c0319b6b603afce33aab0bdea1cdddc.tar.gz vyconf-9cffcca10c0319b6b603afce33aab0bdea1cdddc.zip | |
Add list_children function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vyconf_tree.ml | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/src/vyconf_tree.ml b/src/vyconf_tree.ml index 08bb652..71a7272 100644 --- a/src/vyconf_tree.ml +++ b/src/vyconf_tree.ml @@ -48,6 +48,14 @@ let replace_child node child =  let find_child node name =      find_child_in_list node.children name +let rec extract_names children = +    match children with +    | [] -> [] +    | c :: cs -> c.name :: extract_names cs + +let list_children node = +    extract_names node.children +  let rec insert_child default_data node path data =      match path with      | [] -> raise Empty_path | 
