Math::N...ulative(3)
πΈ NAME πΈ
okay so bestie, welcome to Math::NumSeq::SelfLengthCumulative β it's giving "cumulative digit length of own values" π
and yes it's a Perl module, a user contributed one at that, living in the Perl documentation section, and honestly? iconic.
β¨ SYNOPSIS β¨
use Math::NumSeq::SelfLengthCumulative;
my $seq = Math::NumSeq::SelfLengthCumulative->new (radix => 10);
my ($i, $value) = $seq->next;
like, that's the whole vibe. you use it, you build it, you pull values out one by one. no cap. π¦
π DESCRIPTION π
so what this sequence actually is: it's the cumulative digit length of the values coming out of the sequence itself. self-referential main character energy, fr fr. π₯
1, 2, 3, 4, ... 9, 10, 12, 14, 16, ... 98, 100, 103, 106, ...
let me break down the way that works, because it's lowkey so cute:
- value
9is1digit, so you add1and get10π - then
10is2digits, so you add2and get12 - etc, etc, etc. it just keeps going like that π«
by default it's decimal digits, but there's an optional "radix" parameter and it can do any other base you want. like, for example "radix => 2" gives you binary:
1, 2, 4, 7, 10, 14, 18, 23, 28, 33, 39, 45, ...
the effect in all cases is to step by 1s up to 10, then by 2s up to 100, then 3s up to 1000, etc, in whatever "radix" you picked. so it's similar to DigitLengthCumulative, except its lengths are from i whereas here they're from the values. subtle but important, bestie π§
π«Ά FUNCTIONS π«Ά
for the behaviour common to all sequence classes, go look at "FUNCTIONS" in Math::NumSeq. that's the shared lore, iykyk.
$seq = Math::NumSeq::SelfLengthCumulative->new ()$seq = Math::NumSeq::SelfLengthCumulative->new (radix => $r, to_radix => $t)
create and return a new sequence object. brand new sequence, freshly built, slay π
$bool = $seq->pred($value)
returns true if $value occurs in the sequence. a little yes/no vibe check on whether your number is part of the club π
π SEE ALSO π
- Math::NumSeq
- Math::NumSeq::DigitLength
- Math::NumSeq::DigitLengthCumulative
π HOME PAGE π
<http://user42.tuxfamily.org/math-numseq/index.html>
π LICENSE π
Copyright 2012, 2013, 2014, 2016, 2017, 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. (yes bestie, that's the legal equivalent of "no promises, we tried" π)
You should have received a copy of the GNU General Public License along with Math-NumSeq. If not, see <http://www.gnu.org/licenses/>.
and that's the whole page, periodt. π
this lil doc was rendered by perl v5.42.0, dated 2025-07-25, sitting under the name Math::N...ulative(3) β the truncated little header bestie, it got cut off but we still love her πβ¨
π¦ 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