Attean...erator(3pm)

πŸ’– NAME πŸ’–

Okay bestie, this is the User Contributed Perl Documentation page for Attean::ListIterator(3pm) (the header/footer goes Attean...erator(3pm), iykyk), and it is literally the manual for Attean::ListIterator β€” the iterator implementation backed by a list/array of values. Slay. ✨

🌸 VERSION 🌸

This document describes Attean::ListIterator version 0.035. Periodt.

πŸ¦‹ SYNOPSIS πŸ¦‹

  use v5.14;
  use Attean;
  my @values = map { Attean::Literal->new($_) } (1,2,3);
  my $iter = Attean::ListIterator->new(
    values => \@values,
    item_type => 'Attean::API::Term',
  );

  say $iter->next->value; # 1
  say $iter->next->value; # 2
  say $iter->next->value; # 3

πŸŽ€ DESCRIPTION πŸŽ€

The Attean::ListIterator class represents a typed iterator. It conforms to the Attean::API::RepeatableIterator role. No cap, it's giving repeatable iterator energy. πŸ’…

The Attean::ListIterator constructor requires two named arguments, bestie:

  • values β€” an array reference containing the items to iterate over. πŸ“
  • item_type β€” a string representing the type of the items that will be returned from the iterator. πŸ‘‘

πŸ’… METHODS πŸ’…

  • reset β€” resets the iterator's internal state so that iteration begins again at the beginning of the values array. Fresh start, iconic. ✨
  • next β€” returns the iterator's next item, or undef upon reaching the end of iteration. Bye at the end, bestie. 😭
  • size β€” returns the number of elements still remaining in the iterator until it is fully consumed or until reset is called. It's literally keeping count. πŸ”₯

πŸ‘€ BUGS πŸ‘€

Please report any bugs or feature requests through the GitHub web interface at <https://github.com/kasei/attean/issues>. Report it, don't sit on it, bestie. 🫢

🌈 SEE ALSO 🌈

There are no entries listed in this section, bestie. It's just empty space and vibes. πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

Gregory Todd Williams β€” "<gwilliams@cpan.org>" πŸ’œ

Copyright (c) 2014--2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🧚


🌸 Cute sign-off: source/version is perl v5.40.0, date 2025-01-26, and the footer title is Attean...erator(3pm); we are so done here. πŸ’…

πŸ“¦ where this page comes from