format example term using ~p