Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(array_list), | intent(in) | :: | this | |||
procedure(test_func) | :: | test | A test for which the values that pass will be returned in a new list |
Contains those items in this list for which test
returns
.true.
Returns a new list containing only those items held in this list which pass the provided test.
pure function array_list_filter(this, test)
!* Author: Chris MacMackin
! Date: March 2016
!
! Returns a new list containing only those items held in this list
! which pass the provided test.
!
class(array_list), intent(in) :: this
procedure(test_func) :: test
!! A test for which the values that pass will be returned in a
!! new list
class(list), allocatable :: array_list_filter
!! Contains those items in this list for which `test` returns
!! `.true.`
end function array_list_filter