Useful recipes for Tcl