Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Challenge: Another Infinite Lazy List

by Joost (Canon)
on Mar 17, 2005 at 21:14 UTC ( #440545=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl -w
    use strict;
    ...
    
    sub merge_multiple {
        my $last = 0;
    
  2. or download this
        my %vals = map { $_ => $_ } sort { $a <=> $b } @_;
    
  3. or download this
        my %vals = map { $_ => $_ } @_; 
        sub {
    ...
            $last = $r;
        }
    }