Having a hard time implementing an algorithm? Stand on the shoulder of giants: programming-idioms.org

A nice side effect is, that you can easily compare how it’s done in other languages.