nearest_func Abstract Interface

abstract interface
private pure function nearest_func(this, item, subtraction)

Arguments

Type IntentOptional AttributesName
class(list), intent(in) :: this
class(*), intent(in) :: item

The value which those in the list are being compared to

procedure(subtraction_func) :: subtraction

A function determining the magnitude of the difference between two items

Return Value class(container), allocatable

The value from the list which, when passed to subtraction with item as the other argument, returns the smallest value