Help for this page

Select Code to Download


  1. or download this
    sub decomp {
        @_ = split / /, shift;
        return [ map { join " ", (shift, shift, $_[0]) } (1..@_/2) ];
    }
    
  2. or download this
    sub decomp {
        my $n = 2; # for n+1-uples
        @_ = split / /, shift;
        return [ map { $_*=$n; "@_[$_..$_+$n]" } 0..@_/$n-1 ];
    }