Getting the error:
error FS0193: Type constraint mismatch. The type
'Map<ContentAndYear,DemoMap>'
is not compatible with type
'seq<ContentAndYear * DemoMap>
Problematic Code: Demo is where the error is occurring.
type Demo = Map<ContentAndYear,DemoMap>
type ContentAndYear = Content * Year
let demoMap =
dataMap
|> Seq.ofList
|> Seq.map(fun (content, data) ->
{ Content = content
Year = data.Year
Person = data.Person
NullContent = nullContent.[content].contentraw
PercentContent = nullContent.[content].contentraw
})
|> List.ofSeq
let demolist =
demoMap
|> List.map (fun x -> (x.Content,x.Year) |> ContentAndYear,x)
|> Map.ofList
let x = demolist |> Demo <---- Problem Line
How to Solve? Not sure.