the trick is to use the "drain" command and have your expression return t/nil to indicate whether the calculation should repeat.