Add a utility function Boolean.iter that iterates a function over a formula.