Math::N...llDigits(3)
π Math::NumSeq::AllDigits β bestie edition π
okay so this is a User Contributed Perl Documentation page for Math::NumSeq::AllDigits, and it's literally just the digits of the integers, one by one, no cap. pull up a chair, we're going through the whole thing together π«Ά
β¨ NAME β¨
Math::NumSeq::AllDigits β digits of the integers π
π SYNOPSIS π
use Math::NumSeq::AllDigits;
my $seq = Math::NumSeq::AllDigits->new;
my ($i, $value) = $seq->next;
that's it. that's the whole vibe. three lines and you're in π
π DESCRIPTION π
so the sequence is the digits of the integers 0, 1, 2, etc, and it looks like this:
0,1,2,3,4,5,6,7,8,9, 1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6,...
starting i=0
like yes, it's 0 through 9 first, and then once we hit 10 it starts unspooling into separate digits β 1,0 β and then 1,1, then 1,2, and it just keeps going forever. it's giving "infinite receipt from CVS" energy π§Ύβ¨
default is decimal, obvi. but the "radix" parameter can pick a whole other base if you're feeling spicy πΆοΈ
and there's this optional "order" parameter (it's a string, bestie, remember that) that controls the order of the digits inside each integer:
"forward" high to low, 3512 -> 3,5,1,2
"reverse" low to high, 3512 -> 2,1,5,3
"sorted" sorted, 3512 -> 1,2,3,5
"forward"β high to low, so3512becomes3,5,1,2"reverse"β low to high, so3512becomes2,1,5,3"sorted"β sorted, so3512becomes1,2,3,5
three options, three moods. pick your fighter π
π¦ FUNCTIONS π¦
also see "FUNCTIONS" in Math::NumSeq for the behaviour that's common to all sequence classes β the shared lore, iykyk π
$seq = Math::NumSeq::Digit->new ()$seq = Math::NumSeq::Digit->new (radix => $radix, order => $str)
create and return a shiny new sequence object β¨ like, congrats, you're a parent now.
π Random Access π
$value = $seq->ith($i)β return the $i'th value from the sequence. jump straight to it, no waiting in line π$bool = $seq->pred($value)β return true if $value occurs in the sequence. and like, that's simply whether it's a digit from0toradix-1. nothing deeper than that, fr fr.
π₯ SEE ALSO π₯
Math::NumSeq, Math::NumSeq::All
Math::NumSeq::SqrtDigits, Math::NumSeq::DigitLength, Math::NumSeq::Runs, Math::NumSeq::ConcatNumbers
(the friend group π go say hi)
πΈ HOME PAGE πΈ
<http://user42.tuxfamily.org/math-numseq/index.html>
π LICENSE π
Copyright 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/>.
heads up bestie: that "WITHOUT ANY WARRANTY" part is not a vibe, it's a legal fact. no promises, no guarantees, periodt. π
and that's the whole page!! this was perl v5.42.0, dated 2025-07-25, and honestly? iconic. slay, stay hydrated, and may your digits always be in order πβ¨ππ¦
π¦ 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