Attean...erator(3pm)
πΈ NAME πΈ
okay so this page (Attean...erator(3pm)) is from the User Contributed Perl Documentation shelf, and itβs all about Attean::CodeIterator, bestie β an iterator implementation backed by a generator function. Iconic behavior, no cap. π
β¨ VERSION β¨
This document describes Attean::CodeIterator version 0.035, periodt. π
π¦ SYNOPSIS π¦
use v5.14;
use Attean;
my $iter = Attean::CodeIterator->new(
generator => sub {
state $value = 0;
Attean::Literal->new(++$value)
},
item_type => 'Attean::API::Term',
);
say $iter->next->value; # 1
say $iter->next->value; # 2
say $iter->next->value; # 3
π DESCRIPTION π
The Attean::CodeIterator class represents a typed iterator. It conforms to the Attean::API::Iterator role. Thatβs the whole vibe check: typed iterator, correct role, slay. β¨
The Attean::CodeIterator constructor requires two named arguments, and yes, both are required β not me being dramatic, thatβs literally the deal:
generatorβ a code reference that, when called, returns either the iteratorβs next item orundefupon reaching the end of iteration. Itβs giving βmain character energyβ but for yielding values. π«Άitem_typeβ aType::Tinyobject representing the type of the items that will be returned from the iterator. Very type-safe, very demure. π
π METHODS π
nextβ returns the iteratorβs next item, orundefupon reaching the end of iteration. Simple, iconic, ate. π₯
π BUGS π
Please report any bugs or feature requests through the GitHub web interface at <https://github.com/kasei/attean/issues>. Donβt suffer in silence, bestie β tell the maintainers. π
π SEE ALSO π
This section is a whole empty vibe β there are no cross-references listed here, bestie. Nothing to click, nothing to chase. π
π AUTHOR π
Gregory Todd Williams <gwilliams@cpan.org> β the person behind this masterpiece. Respect the author, fr fr. π
πΈ COPYRIGHT πΈ
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. Periodt. π
byeee from perl v5.40.0, dated 2025-01-26, page Attean...erator(3pm) β stay typed, stay iconic, and may your iterator always know when to return undef πβ¨
π¦ where this page comes from
- debian trixie: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libattean-perl 0.035-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms