[Home] Module Microsoft.FSharp.Compatibility.Map


Extension functionality for maps using structural comparison

Type Definitions

TypeDescription
type Provider A collection of operations for creating and using maps based on a particular comparison function. The 'Tag type parameter is used to track information about the comparison function.
type Provider Note: an abbreviation for Provider<'Key,'T,IComparer<'Key>>

Values

ValueDescription
[<OCamlCompatibilityAttribute ()>]
val fold :
  ('Key -> 'Value -> 'State -> 'State) ->
    Map<'Key,'Value> -> 'State -> 'State
Fold over the bindings in the map
[<OCamlCompatibilityAttribute ()>]
val Make : ('Key -> 'Key -> int) -> Provider<'Key,'T>
[<OCamlCompatibilityAttribute ()>]
val MakeTagged :
  'Tag -> Provider<'Key,'T,'Tag> (requires 'Tag :> IComparer<'Key>)
A functor to build a collection of operations for creating and using maps based on the given comparison function. This returns a record that contains the functions you use to create and manipulate maps of this kind. The returned value is much like an ML module. Language restrictions related to polymorphism may mean you have to create a new instantiation of for each toplevel key/value type pair. To use this function you need to define a new named class that implements IComparer and pass an instance of that class as the first argument. For example: type MyComparer = new() = { } interface IComparer<string> with member self.Compare(x,y) = ... let MyStringMapProvider : Map.Provider < string,int > = Map.MakeTagged(new MyComparer())

See Also

Microsoft.FSharp.Compatibility


Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16