Map on Map<'a, int>
问题 I have the following type : type MultiSet<'a when 'a: comparison> = MSet of Map<'a, int> and I now want to declare af map function for this type with the signature : ('a -> 'b) -> Multiset<'a> -> Multiset<'b> when 'a : comparison and 'b : comparison I have tried : let map m ms = match ms with | MSet s -> MSet ( Map.map (fun key value -> m key) s ) But that it has the signature : ('a -> int) -> Multiset<'a> -> Multiset<'a> when 'a : comparison What is wrong with my implementation when I want