Release coccinelle-0.2.0
[bpt/coccinelle.git] / commons / ocollection.ml
index 6869f4b..e6b2a3d 100644 (file)
@@ -71,6 +71,17 @@ object(o: 'o)
   method virtual null: bool      (* can do default with: lenght(tolist)= 0 *)
 
 
+  method add2: 'a -> unit = fun a -> 
+    o#add a +> ignore;
+    ()
+  method del2: 'a -> unit = fun a -> 
+    o#del a +> ignore;
+    ()
+  method clear: unit = 
+    o#iter (fun e -> o#del2 e);
+    
+
+
 
   method fold: 'b. ('b -> 'a -> 'b) -> 'b -> 'b = fun f a -> 
     let a = ref a in