1 (**************************************************************************)
5 (* François Pottier, INRIA Rocquencourt *)
6 (* Yann Régis-Gianas, PPS, Université Paris Diderot *)
8 (* Copyright 2005-2008 Institut National de Recherche en Informatique *)
9 (* et en Automatique. All rights reserved. This file is distributed *)
10 (* under the terms of the Q Public License version 1.0, with the change *)
11 (* described in file LICENSE. *)
13 (**************************************************************************)
15 include Map.Make
(String
)
18 fold
(fun _ _ x
-> x
+ 1) s
0
21 fold
(fun key
value map
->
22 if pred key
value then
27 let restrict domain map
=
28 filter (fun k _
-> StringSet.mem k domain
) map
31 fold
(fun key _ acu
-> StringSet.add key acu
) map
StringSet.empty