Just a pointer to http://yudkowsky.net/rational/bayes .
Example Tcl code at Bayesian Networks.
TR - Great link. Very explanatory and easy to follow.