This is needed to implement generic library such as the Inductive Graph. Refer http://jelv.is/blog/Generating-Mazes-with-Inductive-Graphs/ https://web.engr.oregonstate.edu/~erwig/papers/InductiveGraphs_JFP01.pdf