! Figure 5.11
      module m_fun
      public :: fun
      contains
         function fun(x) result(f)
            real, intent(in) :: x
            real :: f
         !   :
         end function fun
      end module m_fun
      program main
         use m_fun
         use lib_minimum
         real :: f
         f = minimum(1.0, 2.0, fun)
       !  :
      end program main
