Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ordered), | intent(inout) | :: | this | |||
class(iterable), | intent(inout) | :: | items | The iterable whose contents are to be added to this data structure. |
Adds the contents of an iterable object to this data structure.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(iterator), | public | :: | iter_items |
subroutine iterator_extend(this, items)
!* Author: Chris MacMackin
! Date: February 2016
!
! Adds the contents of an [[iterable]] object to this data structure.
!
class(ordered), intent(inout) :: this
class(iterable), intent(inout) :: items
!! The iterable whose contents are to be added to this data
!! structure.
type(iterator) :: iter_items
iter_items = items%iter()
do while (iter_items%has_next())
call this%push(iter_items%next())
end do
end subroutine iterator_extend