Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(array_list), | intent(in) | :: | this | |||
procedure(comparison_func) | :: | comparison | A procedure which evaluates whether a container object is less than, equal to, or greater than another |
The largest item in the list, as determined by the
comparison
function
Returns the largest item contained in the list, as determined using the provided comparison function.
pure function array_list_max(this, comparison)
!* Author: Chris MacMackin
! Date: March 2016
!
! Returns the largest item contained in the list, as determined
! using the provided comparison function.
!
class(array_list), intent(in) :: this
procedure(comparison_func) :: comparison
!! A procedure which evaluates whether a [[container]] object is
!! less than, equal to, or greater than another
class(container), allocatable :: array_list_max
!! The largest item in the list, as determined by the
!! `comparison` function
end function array_list_max