This is a brief example from the book, by Tomas Petricek, "Functional programming in the real world", chapter 8.
type QueryInfo =
{ Title: string
Check: Client -> bool
Positive: Decision
Negative: Decision
}
and Decision =
| Result of string
| Query of QueryInfo
let rec tree1 =
Query({Title=null;Check=(fun cl -> false);Positive=aaa; Negative=aaa})
and aaa = Result("SOME")
The problem is - when I use tree1, its .Positive and .Negative are nulls. The same if aaa is Query, not Result. How to fix it?