diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-05-23 13:36:39 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2018-05-23 18:50:10 +0200 |
commit | 153de30b639851d5ad285b765b2db7655b2cb635 (patch) | |
tree | a036a8a033e3ea573ea27a79d10b212e0fb444d4 /clib/hMap.ml | |
parent | d8851bbd50df1f77af0aabfe98bebd44fcb4aa02 (diff) |
Collecting Map.smart_* functions into a module Map.Smart.
Diffstat (limited to 'clib/hMap.ml')
-rw-r--r-- | clib/hMap.ml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/clib/hMap.ml b/clib/hMap.ml index 37f867c6b..b2cf47430 100644 --- a/clib/hMap.ml +++ b/clib/hMap.ml @@ -383,13 +383,21 @@ struct let m = Map.set k x m in Int.Map.set h m s - let smartmap f s = - let fs m = Map.smartmap f m in - Int.Map.smartmap fs s + module Smart = + struct + + let map f s = + let fs m = Map.Smart.map f m in + Int.Map.Smart.map fs s + + let mapi f s = + let fs m = Map.Smart.mapi f m in + Int.Map.Smart.map fs s + + end - let smartmapi f s = - let fs m = Map.smartmapi f m in - Int.Map.smartmap fs s + let smartmap = Smart.map + let smartmapi = Smart.mapi let height s = Int.Map.height s |