Skip to main content
Perl 6

                                                An Apocalypse




The Camelia image is copyright 2009 and trademarked by Larry Wall   Matt Follett matt.follett@gmail.com
Instance of Perl 6




          • Pugs - Perl 6 on Haskell
          • Niecza - Perl 6 on the CLR
          • Sprixel - Perl 6 in JavaScript
          • Elf, Mildew
          • Perlito (MiniPerl6) - JVM, Go, Perl 5, JS, Lisp
          • YAPSI - Perl 6 in Perl 6
          • Rakudo - Perl 6 on Parrot




Matt Follett matt.follett@gmail.com
Instance of Perl 6




          • Pugs - Perl 6 on Haskell
          • Niecza - Perl 6 on the CLR
          • Sprixel - Perl 6 in JavaScript
          • Elf, Mildew
          • Perlito (MiniPerl6) - JVM, Go, Perl 5, JS, Lisp
          • YAPSI - Perl 6 in Perl 6
          • Rakudo - Perl 6 on Parrot




Matt Follett matt.follett@gmail.com
Modules




Matt Follett matt.follett@gmail.com
The Backstory

• Perl 6 announced at Perl Conference in 2000
• Immediate RFCs
• First apocalypse on April 2, 2001
• Twelfth apocalypse April 13, 2004




Matt Follett matt.follett@gmail.com

                             http://www.perlfoundation.org/perl6/index.cgi?timeline
More Backstory

• Parrot April Fool’s Joke 2001
• First commit to Parrot on August 29, 2001
• Audrey Tang publicly releases Pugs in February of 2005




Matt Follett matt.follett@gmail.com
Recent History

• Parrot starts monthly releases in January 2007
• Parrot starts major releases on a yearly cycle in 2010
• Rakudo * monthly releases start in July 2010




Matt Follett matt.follett@gmail.com
Recent History

• Parrot starts monthly releases in January 2007
• Parrot starts major releases on a yearly cycle in 2010
• Rakudo * monthly releases start in July 2010




Matt Follett matt.follett@gmail.com
Rakudo *



          • a useful, usable, "early adopter" distribution of Perl
            6
                nota 1.0
                compile yourself

          • Includes modules for XML, JSON, YAML, database
            interfaces, etc
          • includes neutro
          • Helps get feedback to the Rakudo team




Matt Follett matt.follett@gmail.com
Feedback = Improvements




Matt Follett matt.follett@gmail.com
                             http://gil.di.uminho.pt/users/smash/rakudo-bench.html
The Basics




          • Variables are prepended with a sigil to indicate
            their basic type (scalar, array, hash)
          • These sigils are invariant
          • Variables declared with ‘my’ are lexically scoped
          • Perl 6 autoboxes




Matt Follett matt.follett@gmail.com
my @array = 1,2,3;
say(@array[0])

my ($fruit, $jp) = 'apples', JSON.new();
$jp.parse($something_from_somewhere);

my %dictionary = apples => 2, pears => 3;
say("I have %dictionary{$fruit} $fruit");



Matt Follett matt.follett@gmail.com
my @array = 1,2,3;
say(@array[0])

my ($fruit, $jp) = 'apples', JSON.new();
$jp.parse($something_from_somewhere);

my %dictionary = apples => 2, pears => 3;
say("I have %dictionary{$fruit} $fruit");



Matt Follett matt.follett@gmail.com
my @array = 1,2,3;
say(@array[0])

my ($fruit, $jp) = 'apples', JSON.new();
$jp.parse($something_from_somewhere);

my %dictionary = apples => 2, pears => 3;
say("I have %dictionary{$fruit} $fruit");



Matt Follett matt.follett@gmail.com
my @array = 1,2,3;
say(@array[0])

my ($fruit, $jp) = 'apples', JSON.new();
$jp.parse($something_from_somewhere);

my %dictionary = apples => 2, pears => 3;
say("I have %dictionary{$fruit} $fruit");



Matt Follett matt.follett@gmail.com
Optional Typing



      • All variables in Perl 6 have a type, declared like:



               my Str $name = 'Matt Follett';
               $name = 'Matthew Follett';
               $name = 4; # asplode
      • If a type isn’t declared the type is Any


      my $foo = 11;
      say('$foo is an '~ $foo.WHAT); # Any
Matt Follett matt.follett@gmail.com
Types




Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Custom Type & Enums




            subset Odd of Int where * % 2;
            my Odd $number = 41;

            enum Color <red green blue>;
            my Color $color = red;
            say $color == red; # true (1)
            say $color; # 0
            say $color.key; # 'red'

Matt Follett matt.follett@gmail.com
Classes

• declare:
     attributes
     accessors/mutators
     delegation

• inherit from multiple classes
• define methods
• consume roles




Matt Follett matt.follett@gmail.com
class Employee {
 has Str $.name is rw
      = <Alice Bob Charles Dorothy>.pick;
 has Rat $!salary;
 has Rat $!money = 0;

  method work_on( $project ) {
     say "$.name is working on $project."
  }

    method pay() { $!money += $!salary }
}


Matt Follett matt.follett@gmail.com
class Employee {
 has Str $.name is rw
      = <Alice Bob Charles Dorothy>.pick;
 has Rat $!salary;
 has Rat $!money = 0;

  method work_on( $project ) {
     say "$.name is working on $project."
  }

    method pay() { $!money += $!salary }
}


Matt Follett matt.follett@gmail.com
class Employee {
 has Str $.name is rw
      = <Alice Bob Charles Dorothy>.pick;
 has Rat $!salary;
 has Rat $!money = 0;

  method work_on( $project ) {
     say "$.name is working on $project."
  }

    method pay() { $!money += $!salary }
}


Matt Follett matt.follett@gmail.com
class Employee {
 has Str $.name is rw
      = <Alice Bob Charles Dorothy>.pick;
 has Rat $!salary;
 has Rat $!money = 0;

  method work_on( $project ) {
     say "$.name is working on $project."
  }

    method pay() { $!money += $!salary }
}


Matt Follett matt.follett@gmail.com
class Employee {
 has Str $.name is rw
      = <Alice Bob Charles Dorothy>.pick;
 has Rat $!salary;
 has Rat $!money = 0;

  method work_on( $project ) {
     say "$.name is working on $project."
  }

    method pay() { $!money += $!salary }
}


Matt Follett matt.follett@gmail.com
class Employee {
 has Str $.name is rw
      = <Alice Bob Charles Dorothy>.pick;
 has Rat $!salary;
 has Rat $!money = 0;

  method work_on( $project ) {
     say "$.name is working on $project."
  }

    method pay() { $!money += $!salary }
}


Matt Follett matt.follett@gmail.com
class Manager is Employee
{
    has @.employees is rw;
    has Employee $.assistant
                 is ro handles 'work_on';
}




Matt Follett matt.follett@gmail.com
class Manager is Employee
{
    has @.employees is rw;
    has Employee $.assistant
                 is ro handles 'work_on';
}




Matt Follett matt.follett@gmail.com
class Manager is Employee
{
    has @.employees is rw;
    has Employee $.assistant
                 is ro handles 'work_on';
}




Matt Follett matt.follett@gmail.com
Roles

• Classes consume roles
• Roles provide:
     new methods for a set of tasks (like mix-ins)
     modifications for existing methods

• Roles can be consumed at compile time or run time




Matt Follett matt.follett@gmail.com
role Ergonaut
 {
     method evaluate {
         say 'This ' ~ <chair desk>.pick
           ~ ' ' ~ <is isn't>.pick
           ~ ' ergonomic';
     }
 }



Matt Follett matt.follett@gmail.com
• Compile Time

       class EmployeeErgonaut
             is Employee does Ergonaut
       {}

       • Mixin Style
       my Employee $e1 = Employee.new(
           name    => 'Matt',
           title   => 'software developer',
           salary => 1_000_000
       );
       $e1 does Ergonaut;
Matt Follett matt.follett@gmail.com
Sub Signatures

• positional and named parameters
• Constrain method invocation on:
     number        of variables
     types
     where clauses
     pattern

• or, don’t constrain at all




Matt Follett matt.follett@gmail.com
Plain old Positional




         sub exp($base, $exponent) {
             return $base ** $exponent
         }

         exp( 2, 5) # 32




Matt Follett matt.follett@gmail.com
Named Parameters




         sub exp($base, $exponent) {
              return $base ** $exponent
         }
         exp(
              exponent => 5,
              base     => 2
         )


Matt Follett matt.follett@gmail.com
Strictly Named Parameters




sub draw_circle( $canvas, :$x, :$y,
                 :$radius, :$color )


draw_circle( $canvas2, 3, 2, 3, 442266 );




Matt Follett matt.follett@gmail.com
Strictly Named Parameters




sub draw_circle( $canvas, :$x, :$y,
                 :$radius, :$color )


draw_circle( $canvas2, 3, 2, 3, 442266 );




Matt Follett matt.follett@gmail.com
Strictly Named Parameters




sub draw_circle( $canvas, :$x, :$y,
                 :$radius, :$color )


draw_circle( $canvas2,
     x      => 3,
     y      => 2,
     radius => 3,
     color => ”#442266” );
Matt Follett matt.follett@gmail.com
Constraining Inputs




              sub is_prime(           $input )




Matt Follett matt.follett@gmail.com
Constraining Inputs




              sub is_prime( Int $input )




Matt Follett matt.follett@gmail.com
Constraining Inputs




              sub is_prime( Int $input
                              where * % 2)




Matt Follett matt.follett@gmail.com
Methods as Objects




Matt Follett matt.follett@gmail.com
Methods as Objects

• Curry methods



   sub multiply_numbers(Num $x, Num $y) {
       $x * $y;
   }

   my $mult_by_four =
   &multiply_numbers.assuming(4);



Matt Follett matt.follett@gmail.com
Methods as Objects

• Curry methods
• Wrap around methods


   sub multiply_numbers(Num $x, Num $y) {
       $x * $y;
   }

   my $mult_and_add =
   &multiply_numbers.wrap({$^x+$^y
   +callwith($^x, $^y)});


Matt Follett matt.follett@gmail.com
Methods as Objects

• Curry methods
• Wrap around methods


   sub multiply_numbers(Num $x, Num $y) {
       $x * $y;
   }

   my $mult_and_add =
   &multiply_numbers.wrap({$^x+$^y
   +callwith($^x, $^y)});


Matt Follett matt.follett@gmail.com
Methods as Objects

• Curry methods
• Wrap around methods
• Determine method arity

   sub multiply_numbers(Num $x, Num $y) {
       $x * $y;
   }

   my $arity = &multiply_numbers.arity()




Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
Functional Style Pattern Matching

• Perl subs and methods can do pattern matching in their
  parameter list
• Example:

multi divide($num, 0) {
   die 'floating point exception';
}
multi divide($num, $denom) {
    return $num/$denom
}

divide(11, 0); # dies! (would return Inf)
divide(12, 2); # 6
Matt Follett matt.follett@gmail.com
λ Functions

• Just as powerful as named functions
• Multiple ways to create
• A building block of the language




Matt Follett matt.follett@gmail.com
Basic Form




my $add_two_nums =
   sub (Real $x, Real $y) {$x+$y};

$add_two_nums(11,12);




Matt Follett matt.follett@gmail.com
Basic Form




my $add_two_nums =
   sub (Real $x, Real $y) {$x+$y};

$add_two_nums(11,12);




Matt Follett matt.follett@gmail.com
With Twigils




my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);




Matt Follett matt.follett@gmail.com
With Twigils




my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);




Matt Follett matt.follett@gmail.com
With Twigils




my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);


my $add_two_nums=sub($x,$y){$x+$y}

Matt Follett matt.follett@gmail.com
λs are Everywhere




          • All blocks are λs


my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);




Matt Follett matt.follett@gmail.com
λs are Everywhere




          • All blocks are λs


my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);




Matt Follett matt.follett@gmail.com
λs are Everywhere




          • All blocks are λs


my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);

my $add_two_nums = ->$x,$y{$x+$y};
$add_two_nums(11,12);

Matt Follett matt.follett@gmail.com
λs are Everywhere




          • All blocks are λs


my $add_two_nums = sub {$^x+$^y};

$add_two_nums(11,12);

my $add_two_nums = ->$x,$y{$x+$y};
$add_two_nums(11,12);

Matt Follett matt.follett@gmail.com
λs are Everywhere




         • All blocks are λs
         • All blocks benefit




                     for 1..10 -> $x
                     { say $x }



Matt Follett matt.follett@gmail.com
λs are Everywhere




         • All blocks are λs
         • All blocks benefit




                     for 1..10
                     { say $^x }



Matt Follett matt.follett@gmail.com
λs are Everywhere




         • All blocks are λs
         • All blocks benefit




                     for 1..10 -> $x, $y
                     { say "$x, $y" }



Matt Follett matt.follett@gmail.com
λs are Everywhere




         • All blocks are λs
         • All blocks benefit




                     for 1..11 -> $x, $y=''
                     { say "$x, $y" }



Matt Follett matt.follett@gmail.com
Simplest Form

• Uses the Whatever term
• Included in a unary or binary operation
• Statement returns a λ
• Examples:
  my $add_two = * + 2;
  $add_two(3); # 5

  my $invoke_method = *.sort;
  $invoke_method(@some_array);



Matt Follett matt.follett@gmail.com
Operators




Matt Follett matt.follett@gmail.com
Operators

• New Operators
• Better range operator
• Chaining Binary Operators
• New Types of Operators
     Meta Operators
     Junctive Operators

• More powerful custom operators




Matt Follett matt.follett@gmail.com
Range Operator




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'




Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'
• Advanced form takes λs for iterator and ending condition:
    my @fib := 0,1,*+*...*
    my @double_letters := 'a'...* eq 'zz'

Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'
• Advanced form takes λs for iterator and ending condition:
    my @fib := 0,1,*+*...*
    my @double_letters := 'a'...* eq 'zz'

Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'
• Advanced form takes λs for iterator and ending condition:
    my @fib := 0,1,*+*...*
    my @double_letters := 'a'...* eq 'zz'

Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'
• Advanced form takes λs for iterator and ending condition:
    my @fib := 0,1,*+*...*
    my @double_letters := 'a'...* eq 'zz'

Matt Follett matt.follett@gmail.com
Range Operator

• Creates lazily evaluated lists:
    my @N := 0...*
• Basic form is very smart, versatile:

    my @negatives := -1,-2...*
    my @multiples_of_two := 0,2,4...*
    my @powers_of_two := 0,2,4,8...*
    my @letters = 'a'...'z'
• Advanced form takes λs for iterator and ending condition:
    my @fib := 0,1,*+*...*
    my @double_letters := 'a'...* eq 'zz'

Matt Follett matt.follett@gmail.com
Meta Operators

• Meta operators are operators who’s operand is another
  operator
• Simplify writing operators
• Provide new strengths
     meta  reduction operator
     cross meta operator
     hyperoperator




Matt Follett matt.follett@gmail.com
Meta Operators Simplifying Operators

• Assignment operators
        A op= B
     example:

   @names .= sort
• Negated relational operators
     infix
          relational operators can all be negated by prepending ‘!’
     example:


    $foo !< 11




Matt Follett matt.follett@gmail.com
Reduction Meta Operator

• Written as []
• Takes a list and reduces it to a scalar value
• uses a specified infix operator
• like foldl, foldr but respects associativity
• Examples:
   [*] 1..$x
   [**] 1..$x # 1 ** ( 2 ** ( 3 **…$x ) )
   [<] @list or [>] @list




Matt Follett matt.follett@gmail.com
Reduction Meta Operator

• Written as []
• Takes a list and reduces it to a scalar value
• uses a specified infix operator
• like foldl, foldr but respects associativity
• Examples:
   [*] 1..$x
   [**] 1..$x # 1 ** ( 2 ** ( 3 **…$x ) )
   [<] @list or [>] @list




Matt Follett matt.follett@gmail.com
Reduction Meta Operator

• Written as []
• Takes a list and reduces it to a scalar value
• uses a specified infix operator
• like foldl, foldr but respects associativity
• Examples:
   [*] 1..$x
   [**] 1..$x # 1 ** ( 2 ** ( 3 **…$x ) )
   [<] @list or [>] @list




Matt Follett matt.follett@gmail.com
Reduction Meta Operator

• Written as []
• Takes a list and reduces it to a scalar value
• uses a specified infix operator
• like foldl, foldr but respects associativity
• Examples:
   [*] 1..$x
   [**] 1..$x # 1 ** ( 2 ** ( 3 **…$x ) )
   [<] @list or [>] @list




Matt Follett matt.follett@gmail.com
Hyper Meta Operator

• Written as Unicode ‘»’, ‘«‘ or ASCII ‘>>’, ‘<<‘
• Performs the operations as fast as possible
• Can parallelize these operations
• Does not guarantee order of results
• Examples:

 (1..10) >>+<< (21..30);
 my @nums_squared = @nums >>**>> 2;

 my @hellos = "Hello, " <<~<< <Christian
             John Michael Eleanor Chris>;

 @hellos>>.say;
Matt Follett matt.follett@gmail.com
Hyper Meta Operator

• Written as Unicode ‘»’, ‘«‘ or ASCII ‘>>’, ‘<<‘
• Performs the operations as fast as possible
• Can parallelize these operations
• Does not guarantee order of results
• Examples:

 (1..10) >>+<< (21..30);
 my @nums_squared = @nums >>**>> 2;

 my @hellos = "Hello, " <<~<< <Christian
             John Michael Eleanor Chris>;

 @hellos>>.say;
Matt Follett matt.follett@gmail.com
Hyper Meta Operator

• Written as Unicode ‘»’, ‘«‘ or ASCII ‘>>’, ‘<<‘
• Performs the operations as fast as possible
• Can parallelize these operations
• Does not guarantee order of results
• Examples:

 (1..10) >>+<< (21..30);
 my @nums_squared = @nums >>**>> 2;

 my @hellos = "Hello, " <<~<< <Christian
             John Michael Eleanor Chris>;

 @hellos>>.say;
Matt Follett matt.follett@gmail.com
Hyper Meta Operator

• Written as Unicode ‘»’, ‘«‘ or ASCII ‘>>’, ‘<<‘
• Performs the operations as fast as possible
• Can parallelize these operations
• Does not guarantee order of results
• Examples:

 (1..10) >>+<< (21..30);
 my @nums_squared = @nums >>**>> 2;

 my @hellos = "Hello, " <<~<< <Christian
             John Michael Eleanor Chris>;

 @hellos>>.say;
Matt Follett matt.follett@gmail.com
Hyper Meta Operator

• Written as Unicode ‘»’, ‘«‘ or ASCII ‘>>’, ‘<<‘
• Performs the operations as fast as possible
• Can parallelize these operations
• Does not guarantee order of results
• Examples:

 (1..10) >>+<< (21..30);
 my @nums_squared = @nums >>**>> 2;

 my @hellos = "Hello, " <<~<< <Christian
             John Michael Eleanor Chris>;

 @hellos>>.say;
Matt Follett matt.follett@gmail.com