Math::NumSeq::All(3)

πŸ“¦
version 75 Β· 2 versions
, in fedora 43

πŸ’– Math::NumSeq::All πŸ’–

okay bestie, welcome to Math::NumSeq::All, from the User Contributed Perl Documentation collection. it's literally just... all the integers. that's it. that's the module. and honestly? iconic. πŸŽ€


✨ SYNOPSIS ✨

use Math::NumSeq::All;
my $seq = Math::NumSeq::All->new;
my ($i, $value) = $seq->next;

no cap, that's the whole vibe check. πŸ¦‹


🌸 DESCRIPTION 🌸

it's the non-negative integers: 0,1,2,3,4, etc. πŸ’…

as a module it's lowkey trivial, like there is genuinely nothing going on here β€” but the way that it helps you slot all integers into stuff that uses NumSeq? that's the whole point. it's the main character of "just give me everything, thanks." πŸ‘‘


πŸ’– FUNCTIONS πŸ’–

peep "FUNCTIONS" in Math::NumSeq for the behaviour that's common to literally every sequence class, bestie.

  • $seq = Math::NumSeq::All->new () β€” makes you a brand new sequence object and hands it over. slay. ✨
  • $i = $seq->seek_to_value($value) β€” nudges the current i so that next() will give you $value on the next call, or ceil($value) if $value is an integer. 🧚

πŸ¦‹ Random Access πŸ¦‹

  • $value = $seq->ith($i) β€” returns $i. yes literally just $i. no notes. πŸ’€
  • $bool = $seq->pred($value) β€” returns true if $value is an integer. that's the entire personality. 🌈
  • $i = $seq->value_to_i_ceil($value)
  • $i = $seq->value_to_i_floor($value)
  • $i = $seq->value_to_i_estimate($value)

these three all return $value rounded to the next higher or lower integer. rounding girlies, rise. πŸŽ€


⭐ SEE ALSO ⭐

  • Math::NumSeq
  • Math::NumSeq::Even
  • Math::NumSeq::Odd

go read the whole friend group, fr fr. 🫢


🏠 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/>.

⚠️ okay real talk for a sec β€” that "WITHOUT ANY WARRANTY" bit is not a vibe, it's a warning. no promises, bestie. read the license properly. πŸ’œ

and that's a wrap, gorgeous πŸ’… this page is perl v5.42.0, dated 2025-07-25 β€” mwah, kisses, go forth and enumerate every integer that has ever existed 😭πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from