How to write a STD-like algorithm

Nice step-by-step tutorial on how to design, implement and test a STD-like algorithm. As usual, getting the right pass-by-something is always tricky.…