factor out FunctionPresenter#mapping_for and #width_of