! Figure 5.10
   module lib_minimum
   public :: minimum
   contains
      function minimum(a, b, func) result(m) ! Returns the minimum
            ! value of the function func(x) in the interval (a,b)
         real, intent(in) :: a, b
         interface
            function func(x) result(funcx)
               real, intent(in) :: x
               real :: funcx
            end function func
         end interface
         real :: m
         real :: f,x
        !  :
         f = func(x)   ! invocation of the user function.
        !  :
      end function minimum
   end module lib_minimum
