http://www.cs.ncl.ac.uk/publications/trs/papers/129.pdf
*by "poking around" I mean I typed the code into a text editor for further study:
code: https://pastebin.com/6pAkqE2R