Sandbox has the min function example, one is also in the Beta Tests document but that one is more complicated.

The Beta Tests are the code I have from this morning to set up the evaluation of beta estimates