Help for this page

Select Code to Download


  1. or download this
    (quoted from Darren)
    
    ...
      cross([1,2],[3]); # yields ([1,3],[2,3])
      cross([1],[2],[3]) # yields ([1,2,3])
      cross([1],[2],[3,4]) # yields ([1,2,3],[1,2,4])
    
  2. or download this
    sub cross {
        my @list = @_.reverse or return;
    ...
            }
        }
    }