anchor.diff:  
   let toRecord fields = InferedType.Record (None, fields, false)
   
  -let toCollection typ mult =
  -    let tag = typeTag typ
  -    InferedType.Collection([ tag ], Map.ofList [ tag, (mult, typ) ])
  +let toCollection typs =
  +    let tags = typs |> List.map (snd >> typeTag)
  +    InferedType.Collection (tags, List.zip tags typs |> Map.ofList)
   
   /// A collection containing just one type
  -let SimpleCollection typ = toCollection typ InferedMultiplicity.Multiple
  +let SimpleCollection typ =
  +    [ (InferedMultiplicity.Multiple, typ) ]
  +    |> toCollection
   
   let primitiveProperty<'T> name optional =
       { Name = name
  
positive.code:         |> Map.ofList
  
      let expected =
          [ { Name = "field"; Type = InferedType.Heterogeneous cases }]
          |> toRecord
          |> SimpleCollection
  
  
negative.code:     let expected =
          [ collectionProperty<float> "field_single" InferedMultiplicity.Single
            collectionProperty<float> "field_multiple" InferedMultiplicity.Multiple ]
          |> toRecord
          |> SimpleCollection
  
      let actual = BsonInference.inferType "" source
      actual |> shouldEqual expected
  
  [<Test>]
  let ``Infer heterogeneous type of mixed array fields``() =
      let singleInt = bsonArray<int> InferedMultiplicity.Single
      let singleString = bsonArray<string> InferedMultiplicity.Single
  
      let multipleInt = bsonArray<int> InferedMultiplicity.Multiple
      let multipleString = bsonArray<string> InferedMultiplicity.Multiple
  
      let source =
          BsonArray [ BsonDocument([ BsonElement("field_single", singleInt)
                                     BsonElement("field_multiple", multipleInt) ])
                      BsonDocument([ BsonElement("field_single", singleString)
                                     BsonElement("field_multiple", multipleString) ]) ]
  
      let cases =
          [ InferedTypeTag.Number, InferedType.Primitive (typeof<int>, None, false)
            InferedTypeTag.String, InferedType.Primitive (typeof<string>, None, false) ]
          |> Map.ofList
  
      let intProp = primitiveProperty<int> "" false
      let stringProp = primitiveProperty<string> "" false
  
      let singleCollection =
          [ InferedMultiplicity.OptionalSingle, intProp.Type
            InferedMultiplicity.OptionalSingle, stringProp.Type ]
          |> toCollection
  
      let multipleCollection =
          [ InferedMultiplicity.Multiple, intProp.Type
            InferedMultiplicity.Multiple, stringProp.Type ]
          |> toCollection
  
      let expected =
          [ { Name = "field_single"; Type = singleCollection }
            { Name = "field_multiple"; Type = multipleCollection } ]
          |> toRecord
          |> SimpleCollection
  
  