How to create a recursive data structure value in (functional) F#?
问题 How can a value of type: type Tree = | Node of int * Tree list have a value that references itself generated in a functional way? The resulting value should be equal to x in the following Python code, for a suitable definition of Tree: x = Tree() x.tlist = [x] Edit : Obviously more explanation is necessary. I am trying to learn F# and functional programming, so I chose to implement the cover tree which I have programmed before in other languages. The relevant thing here is that the points of