Help for this page

Select Code to Download


  1. or download this
    my @blocks := (0..*).map: -> $n { -> $x, $y { $x * $y * $n } };
    
  2. or download this
    sub gen($x, $y) { state $n = 0; $x*$y*$n++ }
    my @foo := &gen  xx *;
    
  3. or download this
    my @foo := sub ($x, $y) { state $n = 0; $x*$y*$n++ } xx *;
    
  4. or download this
    my @foo = { state $n=-1; $n++; sub ($x,$y) { $x+$y+$n } } ... *;
    
  5. or download this
    for 0..2 -> $i {
       for 0..2 {
    ...
       }
       say;
    }
    
  6. or download this
    8
    8
    ...
    10
    10
    10