Explanation of “tying the knot”
Tying the knot is a solution to the problem of circular data structures. In imperative languages you construct a circular structure by first creating a non-circular structure, and then going back and fixing up the pointers to add the circularity. Say you wanted a two-element circular list with the elements “0” and “1”. It would … Read more