4 open_table : 'a -> T.table -> 'a;
5 close_table: 'a -> T.table -> 'a;
6 map_key : 'a -> T.key -> 'a;
7 open_line : bool -> 'a -> 'a;
8 close_line : bool -> 'a -> 'a;
9 open_entry : bool -> 'a -> 'a;
10 close_entry: bool -> 'a -> 'a -> 'a;
13 let map h g f a b = h a (g (f a) b)
15 let rec fold_table cb a t =
16 let a = cb.open_table a t in
17 let a = fold_entry cb a t.T.te in
20 and fold_entry cb a = function
21 | T.Key k -> cb.map_key a k
23 let a = cb.open_line r a in
24 let a = List.fold_left (map (cb.close_entry r) (fold_table cb) (cb.open_entry r)) a ts in