I also found the Tcl implementation to be easy to read and understand.