The choice of abstraction for diagramming matters a lot. On one hand, using an imperative, and perhaps closer to physical reality, interpretation of the data structures in diagrams is useful for explaining low-level details like memory layout and cache lines etc. On the other, using a functional, more abstract approach might make more sense when teaching functional programming with a mathematical hat on (and in particular, when such a course is teeing up something like Discrete Mathematics).
This reminded of the "Diagramming Program Values by Spatial Refinement" paper from this year's PLDI -- though that does not visualise algorithms. It might be nice to hack this into Introcaml or a runtime types library and get something rough and ready for OCaml.
When Jon and I discussed the trade-off in diagramming choices, our conversation turned to the Software Foundations books. I asked whether it might make sense to teach FoCS using Gallina, but Jon rightly pointed out that it could become quite limiting in real-world scenarios.
This mostly stemmed from a personal desire to see the foundational courses in first year blend together a bit more. I think students should be comfortable writing proofs with pen and paper, but, at the same time, I think teaching functional programming with one eye on proving theorems about your program might help make the whole thing make more sense. Teaching that a tree like:
type 'a tree = Leaf | Branch of 'a * 'a tree * 'a tree
is inductively defined and that may be a good way to prove things about your trees would be nice.