The pseudocode the 0478 and 9618 papers are written in — but it runs. Write it, press Run, and see whether it does what you meant.