https://www.youtube.com/watch?v=gh2A7yFsBZ4
Allen's debut opening of his data structures series. Give it a watch.
Partially persistent B+Tree based upon @pervognsen old B+Tree gist. Converted from recursive to iterative implementation. Uses a unified representation for both interior and leaf nodes for pedagogical simplicity. I really like the iterative version of insert/delete as its just one function for each operation that I can read from top to bottom. By using a Zipper for tree navigation and mutation it becomes easy to add (partial) persistence to tree data structures. That is to say, you use the go_up, go_down functions to navigate the tree and whenever you want to mutate the tree you always use the pointer returned by mutable_focus, also you have to add version numbers on node creation.
https://gist.github.com/mistymntncop/42c59bbcd38596003a85c6e94df00547