I agree that the example is a bit long; not sure if it is a grave issue, but maybe there is some other good place to put it (that could be linked from the reference documentation)?  I think providing an example as a basic template would be quite useful for anyone wishing to implement their own minimizer - it already trackes # of fevs and iterations, provides a forward-compatible calling convention, etc.  I know that I'm personally always very glad for any examples of a functionality I can find in documentation.