anchor.diff:      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
   
  
positive.code: 
  let collectionProperty<'T> name mult =
      let prop = primitiveProperty<'T> name false
      { prop with Type = toCollection prop.Type mult }
  
  let bsonValue<'T> =
      let typ = typeof<'T>
  
negative.code:         |> Map.ofList
  
      let expected =
          [ { Name = "field"; Type = InferedType.Heterogeneous cases } ]
          |> toRecord
          |> SimpleCollection
  
  