See [Book Practical Programming in Tcl and Tk, Third edition].