Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Simulating Perl6 Meta/Hyper operators with pure Functional Programming

by LanX (Canon)
on Oct 01, 2013 at 16:30 UTC ( #1056507=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        <a b> X 1,2 X <x y>
    
    #produces
    ...
        ('b', 1, 'y'),
        ('b', 2, 'x'),
        ('b', 2, 'y')
    
  2. or download this
    pp X {"a".."d"};
    pp X {"a".."b"} X {1..2} X {'x','y'};
    ...
    ["b", 1, "y"]
    ["b", 2, "x"]
    ["b", 2, "y"]
    
  3. or download this
    use strict;
    use warnings;
    ...
    while ( my ($aref)= $iter->() ) {
      pp $aref;
    }
    
  4. or download this
    my @a = 1, 2;
    my @b = 3, 4;
    my @c = @a X+ @b; # 1+3, 1+4, 2+3, 2+4
    
  5. or download this
    my @a = 1, 2;
    my @b = 3, 4;
    my @c = X{@a} X{@b} '+' 
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1056507]
Approved by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2014-10-23 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls