Math::NumSeq::Even(3)
π Math::NumSeq::Even β the manual, but make it cute β¨
okay bestie, so you're looking at Math::NumSeq::Even, which lives in the Math::NumSeq family of Perl modules, and it is literally just the even integers. That's it. That's the whole vibe. She's simple, she's iconic, she understood the assignment. π
πΈ NAME πΈ
Math::NumSeq::Even β even integers π
β¨ SYNOPSIS β¨
here's the whole thing in action, no notes:
use Math::NumSeq::Even;
my $seq = Math::NumSeq::Even->new;
my ($i, $value) = $seq->next;
like. she's thriving. π¦
π DESCRIPTION π
it's the even integers, bestie:
0, 2, 4, 6, 8, 10, ...
starting i=0
that's the sequence. zero, two, four, six, eight, ten, and she keeps going forever because she has main character energy and does not stop. π
π FUNCTIONS π
for the stuff that's shared across all the sequence classes, go peek at "FUNCTIONS" in Math::NumSeq β that's the group chat everyone's in. π«Ά
$seq = Math::NumSeq::Even->new ()β makes a brand new sequence object and hands it to you. fresh out of the box, no cap.
π§ Iterating
$seq->seek_to_i($i)β slides the current position of the sequence over to$i. the very next time you callnext(), it's gonna hand you back$iplus the matching value. so cute. β¨$seq->seek_to_value($value)β moves the currentiaround so thatnext()gives you$valueon the next call. oh and heads up β if$valueis an even integer, you get the next higher even instead. lowkey important, don't forget it. π
π Random Access
$value = $seq->ith($i)β returns2*$i. that's it. math is mathing. π₯$bool = $seq->pred($value)β returns true if$valueis even. vibe check passed β$i = $seq->value_to_i_ceil($value)$i = $seq->value_to_i_floor($value)β returnsvalue/2, rounded up or down to the next integer. pick your fighter. π$i = $seq->value_to_i_estimate($value)β returns an estimate of theithat corresponds to$value. it's giving approximation, it's giving ballpark, and honestly? we respect it. πΈ
π SEE ALSO π
Math::NumSeqMath::NumSeq::OddMath::NumSeq::All
the whole squad. go say hi. π«Ά
π HOME PAGE π
<http://user42.tuxfamily.org/math-numseq/index.html>
π LICENSE π
Copyright 2010, 2011, 2012, 2013, 2014, 2016, 2019, 2020 Kevin Ryde
Math-NumSeq is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Math-NumSeq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
fr fr read the license, it's giving legally binding and she means it π
and that's the whole page babes π this was perl v5.42.0, dated 2025-07-25, from Math::NumSeq::Even(3) β thanks for coming to my ted talk, mwah πβ¨
π¦ where this page comes from
- fedora 43: perl-Math-NumSeq 75-11.fc43 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms