Perl 6のXおよびZメタ演算子

Perl 6の新しいアイデアの1つは、メタ演算子です。 これは、動作を変更することで通常の演算子と組み合わせることができる演算子です。 このようなメタ演算子はいくつかありますが、この記事ではXとZのみを検討します。



中置記号の組み合わせの役割で見ることができる演算子X。 リストを、それぞれの要素ごとに、可能なすべての組み合わせで組み合わせます。



> say ((1, 2) X ('a', 'b')).perl ((1, "a"), (1, "b"), (2, "a"), (2, "b"))
      
      







ただし、 infix: - X, infix:<,> . , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .
















エントリinfix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;



:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .
















infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }



?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .
















infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }



, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .
















infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












 infix: -     X,     infix:<,>
      
      



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .












infix: - X, infix:<,>



. , :



> say ((1, 2) X, (10, 11)).perl ((1, 10), (1, 11), (2, 10), (2, 11))







, ? , infix:<+>







> say ((1, 2) X+ (10, 11)).perl (11, 12, 12, 13)







, . , – .



. infix:<~>







> say ((1, 2) X~ (10, 11)).perl ("110", "111", "210", "211")







infix:<==>







> say ((1, 2) X== (1, 1)).perl (Bool::True, Bool::True, Bool::False, Bool::False)







Z. infix:, "Z,", , . Haskell infix: zip-, Z – zipWith.



> say ((1, 2) Z, (3, 4)).perl ((1, 3), (2, 4)) > say ((1, 2) Z+ (3, 4)).perl (4, 6) > say ((1, 2) Z== (1, 1)).perl (Bool::True, Bool::False)








Z, , , , , .. , , , .



Z – , , , . X .



, , Z, , X.



? .



my %hash = @keys Z=> @values;







:



for @a Z @b -> $a, $b { ... }







?



for @a Z @b Z @c -> $a, $b, $c { ... }







, :



my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10;







, , .















All Articles