Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
There's more than one way to do things
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

You need to make your sorts numeric.

[10:09:10.72] P:\test>copy con junk.pl use strict; use warnings; use overload '""'=>'stringify'; sub stringify { $_[0]->() }; sub make_sub { my ($N) = ( my @f = sort @_ ); return bless sub{ for(;;$N++){ $N % $_ || return $N++ for @f } }; } @ARGV=(2,3,5) unless @ARGV; @ARGV=sort @ARGV; { local $"=", "; local $\="\n"; print "Factors: @ARGV"; foreach (@ARGV) { my $f=make_sub($_); print "F($_) = @{[($f) x 25]}"; } my $o=make_sub(@ARGV); print "R(@ARGV) = @{[($o) x 25]}"; print "----"; } ^Z 1 file(s) copied. [10:09:30.92] P:\test>junk 3 22 111 Factors: 111, 22, 3 F(111) = 111, 222, 333, 444, 555, 666, 777, 888, 999, 1110, 1221, 1332 +, 1443, 1554, 1665, 1776, 1887, 1998, 2109, 2220, 2331, 2442, 2553, 2 +664, 2775 F(22) = 22, 44, 66, 88, 110, 132, 154, 176, 198, 220, 242, 264, 286, 3 +08, 330, 352, 374, 396, 418, 440, 462, 484, 506, 528, 550 F(3) = 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51 +, 54, 57, 60, 63, 66, 69, 72, 75 R(111, 22, 3) = 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, + 144, 147, 150, 153, 154, 156, 159, 162, 165, 168, 171, 174, 176, 177 ----

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?

In reply to Re^2: Challenge: Another Infinite Lazy List by BrowserUk
in thread Challenge: Another Infinite Lazy List by Limbic~Region

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (4)
    As of 2014-04-20 11:06 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (485 votes), past polls