From 4e5747adfd7b5c83cac2c4bb242d85fd3cb6fdd0 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 5 Mar 2014 20:14:51 +0100 Subject: Fixing previous commit. Forgot to include some code. --- lib/hMap.ml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/hMap.ml') diff --git a/lib/hMap.ml b/lib/hMap.ml index cf5d0dfbcd..73cfbd0c71 100644 --- a/lib/hMap.ml +++ b/lib/hMap.ml @@ -258,6 +258,10 @@ struct let max_binding _ = assert false (** Cannot be implemented efficiently *) + let fold_left _ _ _ = assert false (** Cannot be implemented efficiently *) + + let fold_right _ _ _ = assert false (** Cannot be implemented efficiently *) + let choose s = let (_, m) = Int.Map.choose s in Map.choose m @@ -295,4 +299,19 @@ struct let m = Map.update k x m in Int.Map.update h m s + let smartmap f s = + let fs m = Map.smartmap f m in + Int.Map.smartmap fs s + + let smartmapi f s = + let fs m = Map.smartmapi f m in + Int.Map.smartmap fs s + + module Unsafe = + struct + let map f s = + let fs m = Map.Unsafe.map f m in + Int.Map.map fs s + end + end -- cgit v1.2.3